I am trying to search in Solr Instance with :
\\123.45.67.89\Lists\PLAYLIST\EAST
and it would return me results like:
Some Text: \\123.45.67.89\Lists\SAVELIST\ATTTA
Some Text: \\123.45.67.89\lists\PLAYLIST\ABC
Some Text: \\172.21.52.41\Lists\PLAYLIST\EAST
I am sorting based on relevant score and ID
field.
It seems that instead of returning exact matches first, Solr somehow splits everything in search term and then returns those which has the highest score for each term. I am using Text_general
filed type. I am sending query through SolrNet like:
SolrQueryByField query = new SolrQueryByField("body", @"\\123.45.67.89\Lists\PLAYLIST\EAST");
solrQuery = solr.Query(query, new QueryOptions
{
Rows = 100,
Start = 0,
OrderBy = new[] {new SortOrder("ID", Order.DESC), new SortOrder("score", Order.DESC) },
});
If I swap the sort order with relevance first and then ID second then it just ignores the latest records existing in the solr instance and would return older records (2-3 days old) instead of latest records with the same text. (ID is auto increment number and shows latest records in order by desc)
My field has different types of text ranging from XML, to text and some containing URL an file paths etc.
My Question:
Is there a way to modify Solr scoring method, so that exact matches are scored higher than frequency of each search terms splitted on \
or .
?