Question

Is there a way to boost documents by the number of values in a particular multi-valued field - at query time? i.e. More the number of values, more the boost.

Is there something like bf="count(pets)^5.0" - where pets is a multivalued field?

I am aware I can store the count at index time and use a value boost using bf="number_of_pets^5.0" when querying. However, I am trying to find a query time solution for this, so that I can avoid modifying the schema (and re-indexing everything) just for achieving this.

Was it helpful?

Solution

This has already been asked multiple times before. Looks like a wanted feature!

Looking at the wiki I couldn't see any functions related to multivalue field so I think it is safe to assume that nothing has changed since after these answers were provided.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top