I have been able to find the problem. The reason I was getting the false result was because of the SortOrder
specified in my query options. It was overriding the default SortOrder based on relevance score. I just modified my query options like:
var result = solr.Query(solrQuery, new SolrNet.Commands.Parameters.QueryOptions
{
Rows = 100, //
Start = 0,
OrderBy = new[] { new SortOrder("score", Order.DESC), new SortOrder("ID", Order.DESC) },
});
new SortOrder("score", Order.DESC)
will force the results to be returned based on relevance score first and then it will do the sorting based on the ID.
I am not really sure why SortOrder
was overridden when sending a text query to SOLR. But this seems to work since it will select top 100 rows with exact term instead of false positives.
I will just leave this answer for future visitors, and will accept any future answer if it provides reason for this search behaviour.