You can combine queries; they are composable. Whether it makes sense or not for your use case is something you will have to decide. To me it's hard to see a case where vector query 1 AND vector query 2 would be preferable to combining the vectors "up front" (ie when creating the vectors), but maybe?
On Tue, Apr 8, 2025 at 3:04 AM Arun Kumar Kalakanti <arun.kalaka...@gmail.com> wrote: > > Hi all, > > I’m working with vector queries using KnnVectorQuery, which, as I understand > it, requires a vector field with the target vector for vector search and a > separate filter query for other fields based filters. This setup has worked > well for me so far. > > However, I have two queries or use-cases: > 1. A use case where advanced filters are dynamically formed, combining both > Lucene regular fields and vector fields (e.g., Content Field). PFA example. > In this case, separating the vector field from the nested filter pattern > doesn't seem to align well with the expected structure of KnnVectorQuery. > > 2. Second, Can Vector Field be used inside as a Filter Criteria currently ? > Based on how vector search (approximate) works, does it make sense to use it? > > Has anyone encountered a similar challenge or have suggestions on how to > approach these? > > Regards, > Arun > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org