Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solr Index time boosting VS Query time boosting?

Tags:

indexing

solr

Question 1: Can we do Query time boosting(with dismax) only without mentioning boost values at Index time?

Question 2: What are the advantages/disadvantages of doing Index time boost over Query time boost and vice versa.

Query-time and index-time boosting:

At index-time, you have the option to boost a particular document (entirely or just a field). This is internally stored as part of the norms number, which must be enabled for this to work. It's uncommon to perform index-time boosting. At query-time, we have described earlier how to boost a particular clause of a query higher or lower if needed. Later the powerful Disjunction-Max (dismax for short) query will be demonstrated, which can apply searches to multiple fields with different boosting levels automatically.

--Paragraph from Chapter 4 of book "Solr 1.4 Enterprise Search Server"

like image 880
Muhammad Haris Altaf Avatar asked May 10 '12 07:05

Muhammad Haris Altaf


1 Answers

Question 1

Yes, absolutely.

Question 2

Index time boosting may be a little faster but you need to know that boosts are encoded on a single byte which can lead to precision loss: In Lucene, why do my boosted and unboosted documents get the same score?

Query-time boosts are more flexible (they are configurable on a per-query basis).

Index-time boost are a little impractical, I would rather recommend that you get started with query-time boosts.

like image 149
jpountz Avatar answered Nov 05 '22 20:11

jpountz