-
Notifications
You must be signed in to change notification settings - Fork 696
MB-27666: Nested Fields #2224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
MB-27666: Nested Fields #2224
Conversation
2e20e37 to
4c3fdfa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Add support for nested fields in indexing and querying to enable hierarchical document structures and queries on nested objects. This enhances Bleve's search capabilities by supporting complex nested JSON document structures.
- Parse and index nested JSON objects with preserved hierarchical relationships
- Enable conjunction queries on nested fields with proper document matching across hierarchical levels
- Implement nested-aware collectors, searchers, and mapping functionality
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| search_test.go | Comprehensive test suite for nested field querying scenarios |
| search_knn.go | Added nested-aware KNN and eligible collectors |
| search/util.go | Introduced FieldSet utility for field prefix matching |
| search/searcher/*.go | Updated searchers to use new ID comparison methods |
| search/searcher/search_conjunction_nested.go | New nested conjunction searcher implementation |
| search/search.go | Extended DocumentMatch with descendant tracking |
| search/scorer/scorer_conjunction_nested.go | New scorer for nested conjunction queries |
| search/query/*.go | Updated query types and field extraction for nested support |
| search/highlight/highlighter/simple/highlighter_simple.go | Modified to use new fragment addition method |
| search/explanation.go | Added merge utilities for explanations and score breakdowns |
| search/collector/*.go | Enhanced collectors with nested document support |
| mapping/*.go | Added nested mapping interfaces and field tracking |
| index_impl.go | Integrated nested-aware collectors and field loading |
| index/scorch/*.go | Updated index readers to support nested document hierarchy |
| document/document.go | Extended Document with nested document support |
Comments suppressed due to low confidence (1)
search/searcher/search_conjunction_nested.go:1
- Parameter name 'somOfK' appears to be a typo. It should likely be 'sumOfK' to match the usage pattern seen elsewhere in the codebase.
// Copyright (c) 2025 Couchbase, Inc.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
82de66e to
8172f3b
Compare
12aa9e3 to
0182ae8
Compare
Add support for nested fields in indexing and querying
Requires: