Let's Share

My personal place to share knowledge about Sitecore, Powershell, Amazon Web Services and .NET

Why Solr returns to many results?

posted by Robert Senktas   | 21-09-2017


In some project, we have a strange issue - Solr returns too many products for a particular search phrase.
I dig a little in Solr interface and found that query results depend on quotation chars. If I ask SOLR with q=textfield_t:500.619.jk.4 I got 83 results, but when to put the phrase in quotes then I got only one result: q=textfield_t:"500.619.jk.4".

Proper number of returned items Wrong number of returned items

According to documentation, it should search for the exact match in both cases. If you know what difference is between both queries, please let me know.
I enable query debugging in Solr interface and found that query is split for different subqueries.Now I understand why I got a different number of results, but I don't know why the query is divided.

Query with quotes Query without quotest

I spent some time reading SOLR documentation and searching explanation thru Goole, but I can't find any clear answer. Any idea why it works in that way?

Sitecore Solr Search
This is a personal blog. All opinions here are my own opinions and do not represent my employer’s view in anyway.

Sitecore Automation Module