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

Should term vector query remain on 'spelling' field ? #128

Closed
romainruaud opened this issue Sep 21, 2016 · 1 comment
Closed

Should term vector query remain on 'spelling' field ? #128

romainruaud opened this issue Sep 21, 2016 · 1 comment

Comments

@romainruaud
Copy link
Collaborator

romainruaud commented Sep 21, 2016

This is a question.

When doing a search, we first process a termVector query to know if we have the terms in index.

This termVector query is processed on the spelling field.

=> An attribute configured with used_in_spellcheck=false will NOT be copied into the spelling field.

Let's say we have a "color" attribute with the value "blue" and set as used_in_spellcheck=false.

When doing a search on blue, here is the termVector query :

{"doc":{"spelling":"blue"}}

=> This term vector will return no matches ! Because the term blue is NOT on the spelling field.

=> We will process a fuzzy search instead of an exact one. And the fuzzy query is processed only on spelling field => no results !

=> With the current config, this is mandatory to set is_used_in_spellcheck=true if we want to have search results for a given field.

So my question is : why do we not process the term Vector query on the search field ? It would contain the blue value on the example below.

Thank you for your answer @afoucret

@afoucret
Copy link
Contributor

It allows to trigger the fuzzy search even when there is mispelling in description by example.
So it is a design choice.

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

No branches or pull requests

2 participants