qdrant / qdrant/qdrant

Add Polars Support

Open
#3,378 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage
Dominant language
Rust
Stars
34.7k
Forks
2.7k
Avg merge
1d 18h
Merged PRs (30d)
187

Description

Is your feature request related to a problem? Please describe.
Qdrant has different search APIs (e.g. search, search batch, recommend,...), which is very cool. However, the data structure of the output if always slightly different (I'm working with the python client): a list of ScoredPoint, a list of list of ScoredPoint, groups for group searches...
However, I always use a dataframe for postprocessing operations, in particular when I work with tabular data and/or many payload fields. Hence I have to manually convert the data structures mentioned above in a dataframe, that often implies copying the data.

Though less problematic, also when uploading data to the DB, I often find myself having the data in a dataframe (including the embeddings), and I have to convert it to python data structures with the associated convertion cost.

Describe the solution you'd like
A clear and concise description of what you want to happen.
It would be nice to have a direct integration with a dataframe library like Polars (written in Rust, like Qdrant). The output of a search call is directly returned as a Polars dataframe. It would also be nice being able to directly upload the data from a dataframe to the DB.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Manually converting the data to and from a dataframe.

Additional context
Add any other context or screenshots about the feature request here.
Polars (and Pandas 2.0) are built on top of the Apache Arrow columnar format. Supporting such a format could bring many advantages like zero copy operations and others (check: https://arrow.apache.org/).

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

No files, tests, or entry points are named. Start by tracing the Python client's search, search-batch, recommend, group-search, and upload APIs, then determine how Polars or Apache Arrow should represent each input and output shape. Done would require an agreed integration scope and tests covering dataframe reads and writes across these APIs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
api, data
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.