These queries have tens or hundreds of functions, for each category that they are trying to boost differently, and that need to be evaluated in order until one of them matches (which typically still requires to evaluate half the filters on average since values are usually exclusive). It is possible to do something that usually performs better with a script:
But it is still far from being ideal. For instance scripts have to do the ordinal->value lookup here while what we'd really want would be to make this work on top of ordinals. This seems to be a common problem to me, can we add a new query that would help solve this problem?
I have seen a couple users wanting to boost documents based on the category that documents belong to end up with a query that looked like this:
These queries have tens or hundreds of functions, for each category that they are trying to boost differently, and that need to be evaluated in order until one of them matches (which typically still requires to evaluate half the filters on average since values are usually exclusive). It is possible to do something that usually performs better with a script:
But it is still far from being ideal. For instance scripts have to do the ordinal->value lookup here while what we'd really want would be to make this work on top of ordinals. This seems to be a common problem to me, can we add a new query that would help solve this problem?