Options to tune document's relevance in Solr | Lucidworks.com
Working at Lucid Imagination a customer once asked me about how they could modify the score of the documents in Solr in order to get most relevant results higher in the results list. While I was trying to respond the question I realized that there are too many different options, and that not all of them are very easy to understand, so I decided to write some notes summarizing the most common/most used ways to do it. After that, many times I was asked the same question, so I decided to turn those notes into a blog post.
There are two stages where documents can be boosted: At index time and at query time.
At Index Time
This is probably the simplest way, because there are not too many options. It is also the most static way of adding boosts, as changing the boost for a documents would require re-indexing it.
When updating documents using the XMLUpdateRequestHandler, the way to boost a document is to add the optional attribute "boost" to the doc element. When using SolrJ, the way to do it is by using the method
document.setDocumentBoost(x)
Read full article from Options to tune document's relevance in Solr | Lucidworks.com
No comments:
Post a Comment