You neglected to show us your example queries and how you wanted to boost them. The simple answer is to supply multiple query terms with increasing level of detail (e.g., more terms in a quoted phrase) and apply a query boost that is higher for the more exact matches.

If you don't get expected results, please detail precisely which results were not as expected and exactly why you found them to be unexpected.

Add &debugQuery=true to your query request to see how each document is being scored in the "explain" section. Sometimes that will offer clues as to what to focus boosting on.

And finally, you may want to set a document boost at index time for some documents, or maybe define one or more extra fields with boost factors as their values at index time to be used in various query situations and then add a function query to your query to apply those document-specific boosts. Or, those fields could have simple booleans to trigger boost functions.

-- Jack Krupansky

-----Original Message----- From: bbarani
Sent: Thursday, October 25, 2012 12:04 PM
To: solr-user@lucene.apache.org
Subject: How to boost exact match?

Hi,

We have a name field which I am boosting using dismax parser.

I want the search to bring the documents that has exact match compared to
partial match.

Ex:
<doc1>
Name:account
</doc1>
<doc1>
<doc2>
Name:account number
</doc2>
<doc3>
Name:account number - closed account
</doc1>

When I search for account number, I want solr to return the document
containing Name:account number first followed by other documents but it
doesnt seem to return that way.. Can someone please help?

Thanks,
Barani


Thanks,
Barani



--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-boost-exact-match-tp4015862.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to