Re: Distinguish exact match from wildcard match

2017-03-02 Thread Ahmet Arslan
Hi, how about q=code_text:bolt*&fq=code_text:bolt Ahmet On Thursday, March 2, 2017 4:41 PM, Сергей Твердохлеб wrote: Hi, is there way to separate exact match from wildcard match in solr response? e.g. there are two documents: {code_text:bolt} and {code_text:bolter}. When I search for "bolt

Re: Distinguish exact match from wildcard match

2017-03-02 Thread Emir Arnautovic
Again, depending on your case, you can use functions in fl to return additional indicator if doc is exact match or not: q=code_text:bolt OR whatever&fl=*,isExact:tf('code_text_exact', 'bolt') It will return isExact field with values >0 for any doc that has term 'bolt' in code_text_exact field.

Re: Distinguish exact match from wildcard match

2017-03-02 Thread Alexandre Rafalovitch
You could still use scoring with distinct bands of values and include score field to see the assigned score. Then, on the client, you do rough grouping. You could try looking at highlighting, but that's probably computationally irrational for this purpose. You could try enabling debugging and see

Re: Distinguish exact match from wildcard match

2017-03-02 Thread Сергей Твердохлеб
Hi Emir, Thanks for your answer. However in my case I really need to separate results, because I need to treat those resultsets differently. Thanks. 2017-03-02 15:57 GMT+02:00 Emir Arnautovic : > Hi Sergei, > > Usually you don't want to know which is which, but you do want to have > exact match

Re: Distinguish exact match from wildcard match

2017-03-02 Thread Emir Arnautovic
Hi Sergei, Usually you don't want to know which is which, but you do want to have exact matches first. In case of simple queries and depending on your usecase, you can use score to make distinction. If "bolter" matches "bolt" because of some filters, you will need to index it in two fields an

Distinguish exact match from wildcard match

2017-03-02 Thread Сергей Твердохлеб
Hi, is there way to separate exact match from wildcard match in solr response? e.g. there are two documents: {code_text:bolt} and {code_text:bolter}. When I search for "bolt" I want to get both results, but somehow grouped, so I can determine either it was found with exact or non-exact match. Tha