Commit aa5bfd52 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[COSMETICS] SQL query

parent 7094d4d1
...@@ -130,8 +130,6 @@ getOccByNgramsOnlyFast cId lId nt = do ...@@ -130,8 +130,6 @@ getOccByNgramsOnlyFast cId lId nt = do
query :: DPS.Query query :: DPS.Query
query = [sql| query = [sql|
SELECT ng.terms SELECT ng.terms
-- , ng.id
--, round(nng.weight)
, ARRAY( , ARRAY(
SELECT DISTINCT context_node_ngrams.context_id SELECT DISTINCT context_node_ngrams.context_id
FROM context_node_ngrams FROM context_node_ngrams
...@@ -140,9 +138,6 @@ getOccByNgramsOnlyFast cId lId nt = do ...@@ -140,9 +138,6 @@ getOccByNgramsOnlyFast cId lId nt = do
WHERE ng.id = context_node_ngrams.ngrams_id WHERE ng.id = context_node_ngrams.ngrams_id
AND nodes_contexts.node_id = ? AND nodes_contexts.node_id = ?
) AS context_ids ) AS context_ids
-- , ns.version
-- , nng.ngrams_type
-- , ns.ngrams_type_id
FROM ngrams ng FROM ngrams ng
JOIN node_stories ns ON ng.id = ns.ngrams_id JOIN node_stories ns ON ng.id = ns.ngrams_id
JOIN node_node_ngrams nng ON ns.node_id = nng.node2_id JOIN node_node_ngrams nng ON ns.node_id = nng.node2_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