Commit 23d2a12f authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[ngrams by context] fix subquery to limit only to current corpus

parent 25f18d7c
Pipeline #3413 passed with stage
in 93 minutes and 9 seconds
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment