Hi guys, could you help me with implementing exact match search in Solr.
Say I have the following Solr documents: And my search query is: 
By default Solr for the given documents and the search query "cat" will give
all the partially matched documents ("cat", "pussy cat" and "cats"), but
only the "cat" and "cats" results are wanted by me.
To enable the desired Sorl search behavior, as it was suggested  here
<http://lucene.472066.n3.nabble.com/How-to-do-exact-match-td4014264.html#a4014362>
 
, I add prefixes and suffixes to phrases each time when adding new documents
(much more details are given  here
<http://stackoverflow.com/questions/24344740/solr-exact-match-regarding-words-number>
 
).
I can say in most of cases (like for the above documents) this solution is
working (we have now only "cat" and "cats" as the results for the query
"http://localhost:8983/solr/select?q=phraseExact%3A+%22_prefix_+cat+_suffix_%22";).
But if we have the documents like:
If submit the search query
"http://localhost:8983/solr/select?q=phraseExact%3A+%22_prefix_+in+case+if++_suffix_%22";,
then all three documents are returned ("in case if", "worst-case condition",
"optimistic-case module").
I can suppose that such behavior can be because of preposition and
conjunction in the searched phrase "*in* case *if*". These words possibly
are not treated by Solr? Also it is interesting that the number of words
(three words) in the original phrase ("in case if") matches the resulting
phrases ("worst-case condition" and "optimistic-case module").
Do you have some ideas why I have such results and what can be the reasons?




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-Tricky-exact-match-unwanted-search-results-tp4158652.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to