SIGN IN SIGN UP
milvus-io / milvus UNCLAIMED

Milvus is a high-performance, cloud-native vector database built for scalable vector ANN search

0 0 148 Go

fix: size field bitsets by field id range (#50141)

Fixes #50107

## What
- Size field-id-indexed bitsets from the maximum user field-id offset
instead of `schema->size()`.
- Apply the helper to search plan involved-fields bitsets and sealed
segment ready bitsets.
- Add C++ and Python regressions for searching a late StructArray vector
subfield after multiple StructArray parent fields.

## Why
StructArray parent fields consume field IDs but are not stored as
regular C++ schema fields. With multiple StructArray parents, later
subfields can have `field_id - START_USER_FIELDID` greater than
`schema->size()`, causing `invalid field id` during search.

## Verification
- `git diff --cached --check`
- `python3 -m py_compile
tests/python_client/milvus_client/test_milvus_client_struct_array.py`
- `milvus-build build local -b master --allow-dirty`:
`build-local-zhuwenxing-fix-50107-bitset-d44e5bc`
- Deployed
`harbor.milvus.io/manta/milvus:local-zhuwenxing-fix-50107-bitset-d44e5bc`
as `issue-50107-master-fix-d44e5bc`: Healthy
- `verify_milvus.py 10.100.36.218 19530`: passed, server
`master-20260528-b7293edf8d`
- `pytest
milvus_client/test_milvus_client_struct_array.py::TestMilvusClientStructArraySearch::test_search_struct_array_last_vector_subfield`:
1 passed
- Imported original `crime_cases_v3` issue data: 600 rows;
`debug_struct_vector.py`: all 6 ANN searches OK, including
`evidence[evidence_vector]`

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
Z
zhuwenxing committed
5368d066551828c96407baa1d1c2623e1abd4720
Parent: 3517b1e
Committed by GitHub <noreply@github.com> on 6/1/2026, 2:52:18 AM