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

Mix exact search with stemming #99

Open
techgique opened this issue Nov 1, 2019 · 2 comments
Open

Mix exact search with stemming #99

techgique opened this issue Nov 1, 2019 · 2 comments
Assignees

Comments

@techgique
Copy link
Member

This is the droid we're looking for: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/mixing-exact-search-with-stemming.html

@jduss4
Copy link
Contributor

jduss4 commented Jan 6, 2020

Agreed. Another alternative would be to have a dynamic text field type that has the exact searching so that collections could use as many or as few as they wanted, vs in this case where it would be tied to a text field defined in the schema. That would also mean that we wouldn't need to alter the API itself to pick out the text.exact field terminology / send a request for it, I believe?

@jduss4 jduss4 added this to the v2 launch to power center multi project search milestone Jan 6, 2020
@jduss4
Copy link
Contributor

jduss4 commented Jan 9, 2020

@techgique I think you were right about ES being able to tell automatically, that's awesome!

Fortunately, the query_string and simple_query_string queries have a feature that solves this exact problem: quote_field_suffix. This tells Elasticsearch that the words that appear in between quotes are to be redirected to a different field, see below:

I think we would only need to change the API queries being sent to make it work!

@wkdewey wkdewey self-assigned this May 4, 2022
@wkdewey wkdewey modified the milestones: v2 launch to power center multi project search, v2 Launch to power Petitioning for Freedom (Habeas Corpus) May 16, 2022
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

No branches or pull requests

3 participants