Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for searching case names by acronym #10

Open
ProbablyFaiz opened this issue May 15, 2021 · 1 comment
Open

Add support for searching case names by acronym #10

ProbablyFaiz opened this issue May 15, 2021 · 1 comment
Assignees
Labels
feature New feature or request

Comments

@ProbablyFaiz
Copy link
Member

ProbablyFaiz commented May 15, 2021

This is tricky. Some thoughts in no particular order:

  • We can parse the query such that an all-caps token is also searched as an acronym
    • For example, a search for NIFLA should be treated, roughly, as a search for N* I* F* L* A*, while also allowing for uncapitalized conjunctions, articles, and prepositions to not be included in the acronym.
  • One way to do this would be to pass a prefix query just like the one above to Postgres with FOLLOWED BY (<->) operators in between, but Postgres doesn't seem to respect single letter prefix-matches. Look more into this.
  • The other way to do this is to create a curated index as part of the case names to pre-generate possible abbreviations, and when we think there's an abbreviation, query that too.
    • Alternatively, just include the abbreviation(s) in the current searchable case index to have it get surfaced.
@ProbablyFaiz ProbablyFaiz added the feature New feature or request label May 15, 2021
@ProbablyFaiz ProbablyFaiz self-assigned this May 15, 2021
@ProbablyFaiz
Copy link
Member Author

Look into Postgres FTS thesaurus/synonym dictionaries: https://www.postgresql.org/docs/9.1/textsearch-dictionaries.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant