Reputation: 8670
I have indexed some documents in solr successfully and now I want to do ranking of these documents. Can anyone guide me how ranking is done in solr with some reference?
Upvotes: 0
Views: 1294
Reputation: 112
Solr is built on top of lucene so it extends the same mechanism of scoring documents. This link should be helpful http://lucene.apache.org/core/3_5_0/scoring.html.
You can control ranking of documents while indexing and specifying a boost parameter
See SolrInputDocument.setDocumentBoost()
and SolrInputField.setBoost
. The higher the value you specify the higher the document rank will be in the search result.
Additionally you can also specify boost to your query search field.
Upvotes: 0