Reputation: 1762
My collection contain products that have a multivalued tags
field.
Those products will be boosted by functions taking into account popularity. However, the base score, looking for "Shoes" only, would be: 1.5774288 for P1 and 1.3096721 for P2.
Would it be possible that the score be identical for both products?
It is as if the presence of many tags "dilutes" the relevance, for products having more tags than just "Shoes". This will interfere with the boost functions.
Upvotes: 3
Views: 68
Reputation: 1762
As suggested by MatsLindh in a comment, setting omitNorms="true"
on the field AND reindexing the collection made it possible to have equal scores.
Upvotes: 1
Reputation: 20142
you could use a filter query fq=Shoes
instead of the query parameter q=
to filter for the matching documents without affecting the score. A second query parameter to score the results would still be useful, as you can combine both.
The fq parameter defines a query that can be used to restrict the superset of documents that can be returned, without influencing score.
Upvotes: 1