spring-projects / spring-projects/spring-ai
Feature Request: Allow configuration of payload content key for QdrantVectorStore
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
The Problem
The QdrantVectorStore implementation hardcodes the payload field name for document content as "doc_content". This makes it difficult to integrate Spring AI with pre-existing Qdrant collections that use a different naming convention for the primary text field (e.g., "page_content", "text", etc.).
The key is defined as a private static final String and used in private methods (toDocument, toPayload), preventing simple extension or configuration.
The Desired Solution
Introduce a configuration property to allow users to specify the content field name. This would provide a declarative and straightforward way to align Spring AI with existing data schemas.
A clear example of the desired solution
A user should be able to configure the content key in their application.properties or application.yml file:
The QdrantVectorStore should then use this value when reading from and writing to the Qdrant payload, falling back to the default "doc_content" if the property is not set.
The value of the solution
This feature would significantly improve the out-of-the-box experience for users connecting to existing Qdrant databases, removing the need for boilerplate code (subclassing QdrantVectorStore and overriding methods) just to handle a different field name. It makes the component more flexible and easier to adopt in established environments.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the QdrantVectorStore implementation and trace the private toDocument and toPayload methods where the payload content key is used. Add a configurable property exposed through application.properties or application.yml, preserving "doc_content" as the default, and verify that both reading and writing use the configured field name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100