The scenerio is like this: I have to use multi-field query, which indexed several field. When scoring, I want to only consider one field. Say the query is “name=’Chris’ and age=’25′”, the final score is calculated according to age only. How can I do this?
The scenerio is like this: I have to use multi-field query, which indexed several
Share
It’s some time since I last played with Lucene, but I guess you can:
BooleanQueryconsisting of two queries and set individual boosts on them (see here).CustomScoreQuery(a bit verbose example here).