fix(vector): address PR review round 13 — index offset fields + tighten test
- Add chunk_start_offset / chunk_end_offset to _PAYLOAD_INDEX_FIELDS so the legacy offset-based fallback in search/context.py works on Qdrant Cloud strict mode (pre-#75 clients have no chunk_index payload). - Cover chunk_index / chunk_start_offset / chunk_end_offset in the payload-index summary test; refresh the stale field-list comment. - Flag the is_valid_nextcloud_doc_id gate at both chunk-context handler sites with a TODO for future non-numeric doc_types. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
f9ad7dc52e
commit
ae23bbe8b8
@@ -505,6 +505,9 @@ async def get_chunk_context(request: Request) -> JSONResponse:
|
||||
# ints from MySQL auto_increment; doc_id stays a str downstream
|
||||
# (Qdrant payload index is keyword-typed). is_valid_nextcloud_doc_id
|
||||
# rejects "0", leading zeros, and Unicode digits that pass isdigit().
|
||||
# TODO: when chunk-context support extends to non-numeric doc_types
|
||||
# (calendar VEVENT UIDs, CardDAV hrefs, …), relax this gate or make
|
||||
# it doc_type-aware. Today every indexed doc_type is numeric.
|
||||
if not is_valid_nextcloud_doc_id(doc_id):
|
||||
return JSONResponse(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user