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

Fix PDG search #116

Merged
merged 5 commits into from
Mar 19, 2020
Merged

Fix PDG search #116

merged 5 commits into from
Mar 19, 2020

Conversation

michamos
Copy link
Contributor

@michamos michamos commented Mar 19, 2020

Several changes to the query parser:

  • Values with colons inside are now handled for all keywords. This was not handled previously due to the ambiguity in key foo bar:baz. Is it a search for foo bar:baz in key or a search for foo in key and baz in bar? To handle this, colons are allowed only in the first space-separated value. As a side-effect, this allowed to remove the special-casing for texkey searches.
  • Exact matches are delimited by "...". This was previously translated into a term query (for most fields), which is useless for text fields as the search query needs to match exactly the output of the analyzer. Now a match_phrase is used, which should work correctly.
  • Search for creation, update and earliest dates are now handled correctly.
  • Makes the searching for texkeys more strict. Previously anything containing a : would also search in the texkey field. Now the texkey search is only emitted if the term looks like a texkey.
  • INSPIR-3309
  • INSPIR-3310

Signed-off-by: Micha Moskovic <michamos@gmail.com>
Signed-off-by: Micha Moskovic <michamos@gmail.com>
Signed-off-by: Micha Moskovic <michamos@gmail.com>
Signed-off-by: Micha Moskovic <michamos@gmail.com>
Signed-off-by: Micha Moskovic <michamos@gmail.com>
@drjova drjova merged commit 544d8b2 into master Mar 19, 2020
@drjova drjova deleted the fix-PDG-search branch March 19, 2020 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants