Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 175
    • Issues 175
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Issues
  • #222

Closed
Open
Opened Jun 07, 2023 by Przemyslaw Kaminski@cgenie
  • Report abuse
  • New issue
Report abuse New issue

ngrams children in `node stories` are not in the `ngrams` table

with child_ngrams as
(select jsonb_array_elements_text(ngrams_repo_element->'children') as term
from node_stories)
select child_ngrams.term, ngrams.terms from child_ngrams
left join ngrams on child_ngrams.term = ngrams.terms
where ngrams.terms is null
order by child_ngrams.term

The above query reports child terms from node_stories table (they live in a JSON struct) which aren't in the ngrams table. I had 2 such elements, you had more than 180. This is wrong. We should add a DB constraint so that whenever this is inserted, the DB should refuse: this way we can spot which place in code is making this inconsistency.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext#222