You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2013/05/22 21:37:00 UTC
[Solr Wiki] Update of "SolrRelevancyFAQ" by HossMan
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "SolrRelevancyFAQ" page has been changed by HossMan:
https://wiki.apache.org/solr/SolrRelevancyFAQ?action=diff&rev1=27&rev2=28
Comment:
clarify doc boost, discourage field & doc boosts in favor of boosting on numeric fields
=== index-time boosts ===
To increase the scores for certain documents that match a query, regardless of what that query may be, one can use index-time boosts.
- Index-time boosts can be specified per-field also, so only queries matching on that specific field will get the extra boost. An Index-time boost on a value of a multiValued field applies to all values for that field.
+ Index-time boosts can be specified per-field also, so only queries matching on that specific field will get the extra boost. An Index-time boost on a value of a multiValued field applies to all values for that field.
+ Under the covers, solr uses this numeric boost value as a factor that contributes to the "norm" for the field (along with teh length of the field in terms) so it is only valid if 'omitNorms="false"' for the fields you use it on. It will also be encoded according to the rules of the Similarity class used, which means it may loose precision. (ie: in the DefaultSimilarity, the numeric norm value is encoded as a single byte using a 3-bit mantissa, so differences in boost values of less than 25% may end up being rounded out)
+
- Index-time boosts are assigned with the optional attribute "boost" in the <doc> section of the XML updating messages. See UpdateXmlMessages for more information.
+ Index-time boosts may also be assigned with the optional attribute "boost" in the <doc> section of the XML updating messages - in which case it is equivilent to specifying the boost param on all of the individual fiels. See UpdateXmlMessages for more information.
- Be aware that all index-time boosts end up being encoded into a single byte using [[http://lucene.apache.org/core/old_versioned_docs/versions/3_5_0/api/core/org/apache/lucene/search/Similarity.html#encodeNormValue%28float%29|Similarity.encodeNormValue]], which uses a 3-bit mantissa. So differences in boost values of less than 25% may end up being rounded out.
+ Using Field and/or Document boosts has been supported since the very early days of Lucene, but is some what limiting and antiquated at this point, and instead people should strongly consider indexing their boost values as numeric fields instead (see next section)
=== Field Based Boosting ===