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.