I am trying to determine if it is feasible to include boosting of results based on a number of conditions that might or might not be true for each result.
We have implemented some boosting using a function_score clause today and that includes a number of conditions but each one is independent of others.
We are now trying to tackle a scenario where we need to match multiple conditions for each result but we don't care which specific conditions match - only how many.
Hopefully this makes sense, but a simplified example:
A result A matches the inclusion criteria. It has a score from that match.
We want to boost that score. Let's say we need to test 5 related conditions for a result.
If one of those conditions matches, we want to increase the score by a particular amount.
If two of those conditions match, we want to increase the score by a slightly larger amount.
If three, by a slightly larger amount.
The "amount" is not really a decay function but it is kind of similar - we want the first match to have a minimum impact but we don't want to just use the exact same boost for each additional match.
Is this something that could be done using function_score or some other approach?