-
Notifications
You must be signed in to change notification settings - Fork 67
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
When this query parser finds synonyms, it needs the longest match. #25
Comments
I think this is because of the analyzer. Another example of not wanting the synonyms analyzed like a normal query. |
But... http://127.0.0.1:8983/solr/select?qf=Title_t&q=dog%20inc&defType=synonym_edismax&synonyms=true&debugQuery=true&synonyms.constructPhrases=true&synonyms.originalBoost=1.1&synonyms.synonymBoost=0.9&q.op=AND |
Looks to me that second query is parsed differently. |
@OkkeKlein And I can't always use the WhitespaceTokenizer or KeywordTokenizer for query and synonym. |
Sorry, but I'm struggling to understand the issue here. Could you write a unit test to demonstrate what's not functioning here? Just make a branch and modify the |
I insert the synonyms for dog just like below.
When I search "dog", I want to search "dog" or "man's best friend" or "dog(inc)" and it works perpectly.
When I search "dog(inc), I want to search "dog(inc)" or "dog" or "man's best friend" too.
But this query parser finds synonyms for "dog(inc)" and "dog" also(maybe uses the shortest match). And It searches ("doc" and "inc") or ("doc's synonyms" and "inc").
hmm....
I think the search query has to be the longest matched in the synonym_edismax query parser.
The text was updated successfully, but these errors were encountered: