Skip to content

fix(milvus): use explicit output_fields in query_vector for milvus-lite 3.0 compatibility#6091

Merged
cdoern merged 1 commit into
ogx-ai:mainfrom
derekhiggins:fix/milvus-lite-3-chunk-content
Jun 12, 2026
Merged

fix(milvus): use explicit output_fields in query_vector for milvus-lite 3.0 compatibility#6091
cdoern merged 1 commit into
ogx-ai:mainfrom
derekhiggins:fix/milvus-lite-3-chunk-content

Conversation

@derekhiggins

Copy link
Copy Markdown
Contributor

Summary

  • query_vector used output_fields=["*"] in client.search(), but milvus-lite 3.0 no longer expands ["*"] to include JSON fields in search results, causing KeyError: 'chunk_content'
  • Changed to output_fields=["chunk_content"], consistent with query_keyword and query_hybrid which already use explicit field names
  • The remote::milvus provider (connecting to a full Milvus server) was not affected

Closes #6090
RHAIENG-5601

Test plan

  • Reproduced the bug with milvus-lite 3.0 via standalone script
  • Reproduced via REST API (/v1/vector-io/query returns 500, /v1/vector_stores/{id}/search returns empty)
  • Verified fix works with milvus-lite 3.0 - both endpoints return correct results
  • Fix is backward compatible with milvus-lite 2.x (explicit field names work in both versions)

…te 3.0 compatibility

milvus-lite 3.0 no longer expands output_fields=["*"] to include JSON
fields in client.search() results, causing KeyError: 'chunk_content'.
Use explicit field name, consistent with query_keyword and query_hybrid.

Closes: ogx-ai#6090

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Derek Higgins <[email protected]>
@cdoern

cdoern commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

@Mergifyio backport release-1.1.x

@mergify

mergify Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

backport release-1.1.x

✅ Backports have been created

Details

@cdoern
cdoern added this pull request to the merge queue Jun 12, 2026
Merged via the queue into ogx-ai:main with commit 16c0ad8 Jun 12, 2026
39 checks passed
cdoern pushed a commit that referenced this pull request Jun 12, 2026
…te 3.0 compatibility (backport #6091) (#6096)

## Summary
- `query_vector` used `output_fields=["*"]` in `client.search()`, but
milvus-lite 3.0 no longer expands `["*"]` to include JSON fields in
search results, causing `KeyError: 'chunk_content'`
- Changed to `output_fields=["chunk_content"]`, consistent with
`query_keyword` and `query_hybrid` which already use explicit field
names
- The `remote::milvus` provider (connecting to a full Milvus server) was
not affected

Closes #6090
RHAIENG-5601

## Test plan
- [x] Reproduced the bug with milvus-lite 3.0 via standalone script
- [x] Reproduced via REST API (`/v1/vector-io/query` returns 500,
`/v1/vector_stores/{id}/search` returns empty)
- [x] Verified fix works with milvus-lite 3.0 - both endpoints return
correct results
- [x] Fix is backward compatible with milvus-lite 2.x (explicit field
names work in both versions)<hr>This is an automatic backport of pull
request #6091 done by [Mergify](https://mergify.com).

Signed-off-by: Derek Higgins <[email protected]>
Co-authored-by: Derek Higgins <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inline::milvus vector query fails with KeyError: 'chunk_content' when using milvus-lite 3.0

2 participants