segunda-feira, 10 de setembro de 2012

Apache Lucene - Scoring

There are 3 types of score boosting:


Score Boosting [1]

Lucene allows influencing search results by "boosting" in more than one level:
  • Document level boosting - while indexing - by calling document.setBoost() before a document is added to the index.
  • Document's Field level boosting - while indexing - by calling field.setBoost() before adding a field to the document (and before adding the document to the index).
  • Query level boosting * - during search, by setting a boost on a query clause, calling Query.setBoost()
* For dismax type in query level boosting, it is need to specify boosts on fields in parameter qf [2].


[1] http://lucene.apache.org/core/3_6_0/scoring.html#Score%20Boosting 
[2] http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_make_.22superman.22_in_the_title_field_score_higher_than_in_the_subject_field 

Nenhum comentário: