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 166
    • Issues 166
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 11
    • Merge Requests 11
  • 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
  • Merge Requests
  • !323

Merged
Opened Aug 19, 2024 by Alfredo Di Napoli@AlfredoDiNapoli
  • Report abuse
Report abuse

Allow more results from partial match search

Fix one wrinkle of the search that @athomas had when using the ~ operator:

partial_matches_simple

@anoe Let me explain how this works: the original issue was that we discovered that for some words (like down in Anne-Laure's example) are really considered stop words and thus not meaningful, so they are excluded by Postgres in a corpus search. However, it's sometimes useful to search for them (like down, in the example).

What this MR is doing is switching to a different dictionary when we use the partial match ~ operator (and only in that case!), which means that queries that wouldn't yield any result, they do now.

However, we now need to use this operator sparingly as it's very powerful: for example it will match documents if you search for very common words like ~for or even ~a, I think, which might lead to very slow queries.

My recommendation is to give this MR a try without premature optimisation -- if performances are ever going to be a problem, there are other paths we can take, for example curating the list of stop words so that things like down are not considered stopwords, and use these custom dictionaries in the ~ case.

This MR relies on this unmerged MR from opaleye-textsearch: opaleye-textsearch!1 (merged)

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b adinapoli/issue-265 origin/adinapoli/issue-265

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/dev
git merge --no-ff adinapoli/issue-265

Step 4. Push the result of the merge to GitLab

git push origin dev

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 0
  • Commits 2
  • Pipelines 2
  • Changes 6
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
1
Labels
Ready to merge
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext!323

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.