Hello, I'm exploring some personalization to our sort orders. If I have an original query q which is mostly just a set of term filters, and I want to sort those by distance between some float vector on the document and a supplied user vector. I only see one way to do this. I would create a new boolean query (bq) with a minimum should level of 0. - MUST: original query (q) wrapped in a constant score query - SHOULD: KnnFloatVectorQuery(VectorFieldName, userVector, 100, q) As I understand it, this would set the relevance score on the closest 100 neighbors to the user's vector that are also in the original query (q), and the remaining would have a constant relevancy of 1. In my experimenting, I have to call query.rewrite(bq) in order to make the KnnFloatVectorQuery respect the original conditions of q. That it is not enough to pass the original q into the constructor for the KnnFVQ(). I feel like I must be either A) Missing a better way to do this, or B) Missing something about how to construct this query, or just knowing that rewrite is required when making a query with the KnnFVQuery in it that has a filter query itself.
Any insight would be much appreciated. Thank you, Marc