redis / redis/redis-vl-python

Simplify the chaining of queries

Open
#167 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
427
Forks
101
Avg merge
6d 3h
Merged PRs (30d)
20

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the two cases described: chaining through INKEYS and chaining through a TAG filter on an indexed id field. Clarify how the query object and helper methods should represent each intermediate subset and how many steps may be chained. Done should support both cases and general N-step query chaining, with behavior agreed for each intermediate result.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, redis
Domain
backend-api-design, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.