pangwangshu opened a new pull request, #40502:
URL: https://github.com/apache/beam/pull/40502

   Adds an optional `content_payload_key` field to `QdrantWriteConfig`. When 
set, the converter stores `EmbeddableItem.content_string` under that key in the 
point payload, next to the metadata, so points retrieved from a collection 
written by Beam carry the chunk text. `BigQueryVectorWriterConfig` and the 
Milvus writer already persist the content; the Qdrant writer stored only 
`item.metadata`.
   
   - The default is `None`, which writes only the metadata as before, so there 
is no behavior change for existing users.
   - A key that collides with a metadata key raises `ValueError` instead of 
overwriting it.
   - An empty key is rejected in `__post_init__`.
   - The item's `metadata` dict is copied, not mutated.
   - As with the BigQuery writer, an item with no text or image URI raises 
`ValueError` from `content_string` when the key is set.
   
   The two design questions in #40476 are still open: whether leaving the 
content out was deliberate, and whether an opt-in key is the right shape 
compared with always writing to a fixed `"content"` key. I am happy to change 
the name or the default based on review.
   
   **Testing**
   
   - `qdrant_test.py`: 5 new converter tests (default unchanged, key writes 
content, no metadata, collision, empty key). All 43 tests in the file pass 
locally.
   - `qdrant_it_test.py`: new `test_write_with_content_payload_key` writes 
through the transform to a testcontainers Qdrant instance and asserts the 
payload read back is the metadata plus the content. All 7 tests in the file 
pass locally on DirectRunner.
   - `CHANGES.md` updated.
   
   **AI assistance disclosure**
   
   Per the [ASF generative tooling 
guidance](https://www.apache.org/legal/generative-tooling.html): this change 
was written with the help of Claude Code (Claude Opus 5.5). I have reviewed the 
code and tests and ran them locally, and to my knowledge the change contains no 
third-party copyrighted material.
   
   Generated-by: Claude Code (Claude Opus 5.5)
   
   Fixes #40476
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to