Reputation: 479
I have a requirement that , if i am searching for 'Which are' the first result of solr should be the text containing 'Which are' and thereafter it should be like matching either 'Which' or 'are'. Currently if i search for 'Which are' , the sentence containing 'Which' are coming at the top and containing 'Which are' is way below in search result .
Upvotes: 1
Views: 87
Reputation: 8678
You can try boosting a document..Use Query-time boosts
Query-time boosts
are applied when constructing a search query, and apply to specific fields.
Query boosts
are applied by appending the caret character ^
followed by a positive number to query clauses
title:"Which are"^10
Upvotes: 2