I want to boost some important terms when query automaticly,how to deal it? For example,the query phrase:"apple tree",i want to set the term of "apple" weight "2",higher than "tree" automaticly through the lexicon.Is there a better way?
Asked
Active
Viewed 57 times
1 Answers
0
if by "automatically through the lexicon" you mean "at index time", then yes, you can do this in Solr5 via field boosting. You would set the boost to each field depending on the value it contains.
But as of Solr 6.5 index time boosts have been depredated, so I would not use them if you intend to upgrade in the future.
You can just use a docValue field, and store the boost value there, and at query time use that value to weight with the score.

Persimmonium
- 15,593
- 11
- 47
- 78
-
"automatically through the lexicon" : after analyzing the query phrase,set the boost to the important terms in the phrase not the "field boosting".Futher more,the query phrase is made up of those terms may appear the single field. – Tartur Mar 24 '17 at 02:05