Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the chaining of queries #167

Open
pierrelambert opened this issue Jun 20, 2024 · 1 comment
Open

Simplify the chaining of queries #167

pierrelambert opened this issue Jun 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@pierrelambert
Copy link

In some cases we need to perform multiple queries to be able to extract the document we need.

First case:
Query1 without return fields: returns the id of keys (with with vector_distance or other) => The SubsetA

=> If I need to perform a second query, Query2 taking SubsetA as input to perform a new VectorQuery limited to this subset:
Search query language permits me to use INKEYS keyword to limit the scope of a query to a subset of keys

Second case:
Query1 without return an indexed id field (with with vector_distance or other) => The SubsetB
=> If I need to perform a second query, Query2 taking SubsetB as input to perform a new VectorQuery limited to this subset:
Search query language permits me to use a TAG filter on the id field to limit the scope of a query to a subset of id

in both case we may imagine N steps.

It would be nice to provide helper method , enrich query object to be able to chain the Queries.

@tylerhutcherson
Copy link
Collaborator

I imagine this as some kind of pipeline like operation. What would be the right kind of utility here? It seems like depending on the specific use case, the number of iterations and the steps required would have to be heavily customized. For example, how do you control an arbitrary stopping condition?

However, if we can extend to support some lower level functionality that may help build this, I'm open to that for sure. The ability to use TAG fields like this should be supported today through a VectorQuery --> use results to build a Tag filter expression --> another VectorQuery w/ filter.

@tylerhutcherson tylerhutcherson added the enhancement New feature or request label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants