Skip to content

MB-27666, MB-69881: Backport necessary commits into morpheus#2273

Merged
CascadingRadium merged 9 commits into8.0.x-couchbasefrom
801_BP
Jan 21, 2026
Merged

MB-27666, MB-69881: Backport necessary commits into morpheus#2273
CascadingRadium merged 9 commits into8.0.x-couchbasefrom
801_BP

Conversation

@CascadingRadium
Copy link
Member

CascadingRadium and others added 8 commits January 20, 2026 13:44
- Use a `bitset` to track eligible documents instead of a slice of `N
uint64s`, reducing memory usage from `8N bytes` to `N/8 bytes` per
segment (up to `64×` reduction) and improving cache locality.
- Pass an iterator over eligible documents that iterates the bitset
directly, allowing direct translation into a bitset of eligible vector
IDs in the storage layer and eliminating the need for a separate slice
intermediary.
- Fix garbage creation in the `UnadornedPostingsIterator`, which
previously allocated a temporary struct per Next() call to wrap a doc
number and satisfy the `Postings` interface; the iterator now returns a
single reusable struct (one-time allocation) consistent with the working
of the `PostingsIterator` in the storage-layer.
- Avoid unnecessary `BytesRead` statistics computation when executing
searches in no-scoring mode, removing redundant work as a
micro-optimization.

---------

Co-authored-by: Abhinav Dangeti <abhinav@couchbase.com>
Add support for nested fields in indexing and querying
- Parse and index nested JSON objects
- Enable queries on nested fields
- Preserve hierarchical relationships in index

Requires:
- blevesearch/bleve_index_api#70
- https://github.com/blevesearch/bleve_index_api/releases/tag/v1.3.0
- blevesearch/scorch_segment_api#63
- https://github.com/blevesearch/scorch_segment_api/releases/tag/v2.4.0
- blevesearch/zapx#339,
blevesearch/zapx#365
    - https://github.com/blevesearch/zapx/releases/tag/v17.0.0
    - https://github.com/blevesearch/zapx/releases/tag/v16.3.0

Resolves:
- #15
- #637
- #1297

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Abhinav Dangeti <abhinav@couchbase.com>
- Fix nested-mode search for field-implicit queries (`match_all`,
`docID`): These queries previously filtered nested documents at the
searcher level, but since `ExtractFields` returned no fields, the nested
collector was never activated. In compound queries (e.g., Boolean
filters), this caused a level mismatch—searcher filtering vs
nested-level execution—resulting in zero matches.
- Unify filtering at collector level: Introduced `HasID()` and
`HasAll()` flags in `FieldSet` to track field-implicit queries. Removed
searcher-level filtering from `MatchAllSearcher`.
- Nested collector now correctly activates, ensuring consistent behavior
regardless of query composition.
- Fix an edge case where usage of `match_all query` as a sub-clause in a
`NestedConjunctionSearcher` could cause a panic.
- Fix a case where root document fields would get excluded from the
`_all` field even when included.
- Fix outdated information in `hierarchy.md`
- Add unit tests for Hierarchical Nested Vector Search.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 49 out of 50 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@CascadingRadium CascadingRadium merged commit a4cbe82 into 8.0.x-couchbase Jan 21, 2026
15 checks passed
@CascadingRadium CascadingRadium deleted the 801_BP branch January 21, 2026 06:12
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.

3 participants