Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
120
Issues
120
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
23d2a12f
Commit
23d2a12f
authored
Nov 24, 2022
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ngrams by context] fix subquery to limit only to current corpus
parent
25f18d7c
Pipeline
#3413
passed with stage
in 93 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
NgramsByContext.hs
src/Gargantext/Database/Action/Metrics/NgramsByContext.hs
+9
-1
No files found.
src/Gargantext/Database/Action/Metrics/NgramsByContext.hs
View file @
23d2a12f
...
...
@@ -121,6 +121,7 @@ getOccByNgramsOnlyFast cId lId nt = do
->
Cmd
err
[(
Text
,
DPST
.
PGArray
Int
)]
run
cId'
lId'
nt'
=
runPGSQuery
query
(
cId'
,
cId'
,
lId'
,
ngramsTypeId
nt'
)
...
...
@@ -130,7 +131,14 @@ getOccByNgramsOnlyFast cId lId nt = do
SELECT ng.terms
-- , ng.id
--, round(nng.weight)
, ARRAY(SELECT DISTINCT context_node_ngrams.context_id FROM context_node_ngrams WHERE ng.id = ngrams_id) AS context_ids
, ARRAY(
SELECT DISTINCT context_node_ngrams.context_id
FROM context_node_ngrams
JOIN nodes_contexts
ON context_node_ngrams.context_id = nodes_contexts.context_id
WHERE ng.id = context_node_ngrams.ngrams_id
AND nodes_contexts.node_id = ?
) AS context_ids
-- , ns.version
-- , nng.ngrams_type
-- , ns.ngrams_type_id
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment