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
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
a6789f09
Commit
a6789f09
authored
May 11, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX]
#199
parent
d7feabb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
20 deletions
+18
-20
gargantext.cabal
gargantext.cabal
+1
-1
NgramsByContext.hs
src/Gargantext/Database/Action/Metrics/NgramsByContext.hs
+17
-19
No files found.
gargantext.cabal
View file @
a6789f09
...
@@ -5,7 +5,7 @@ cabal-version: 1.12
...
@@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack
-- see: https://github.com/sol/hpack
name: gargantext
name: gargantext
version: 0.0.6.9.9.4.4
version:
0.0.6.9.9.4.4
synopsis: Search, map, share
synopsis: Search, map, share
description: Please see README.md
description: Please see README.md
category: Data
category: Data
...
...
src/Gargantext/Database/Action/Metrics/NgramsByContext.hs
View file @
a6789f09
...
@@ -122,31 +122,29 @@ getOccByNgramsOnlyFast cId lId nt = do
...
@@ -122,31 +122,29 @@ getOccByNgramsOnlyFast cId lId nt = do
->
Cmd
err
[(
Text
,
DPST
.
PGArray
Int
)]
->
Cmd
err
[(
Text
,
DPST
.
PGArray
Int
)]
run
cId'
lId'
nt'
=
runPGSQuery
query
run
cId'
lId'
nt'
=
runPGSQuery
query
(
cId'
(
cId'
,
cId'
,
lId'
,
lId'
,
ngramsTypeId
nt'
,
ngramsTypeId
nt'
)
)
query
::
DPS
.
Query
query
::
DPS
.
Query
query
=
[
sql
|
query
=
[
sql
|
SELECT ng.terms
WITH node_context_ids AS
, ARRAY(
(select context_id, ngrams_id
SELECT DISTINCT context_node_ngrams.context_id
FROM context_node_ngrams_view
FROM context_node_ngrams
WHERE node_id = ?
JOIN nodes_contexts
), ns AS
ON context_node_ngrams.context_id = nodes_contexts.context_id
(select ngrams_id FROM node_stories
WHERE ng.id = context_node_ngrams.ngrams_id
WHERE node_id = ? AND ngrams_type_id = ?
AND nodes_contexts.node_id = ?
)
) AS context_ids
FROM ngrams ng
SELECT ng.terms,
JOIN node_stories ns ON ng.id = ns.ngrams_id
ARRAY ( SELECT DISTINCT context_id
JOIN node_node_ngrams nng ON ns.node_id = nng.node2_id
FROM node_context_ids
WHERE nng.node1_id = ?
WHERE ns.ngrams_id = node_context_ids.ngrams_id
AND nng.node2_id = ?
)
AND nng.ngrams_type = ?
AS context_ids
AND nng.ngrams_id = ng.id
FROM ngrams ng
AND nng.ngrams_type = ns.ngrams_type_id
JOIN ns ON ng.id = ns.ngrams_id
ORDER BY ng.id ASC;
|]
|]
...
...
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