Skip to content

Conversation

@CascadingRadium
Copy link
Member

@CascadingRadium CascadingRadium commented Sep 6, 2025

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:

@CascadingRadium CascadingRadium changed the title Nested Fields [WIP] MB-27666: Nested Fields Sep 13, 2025
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

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.

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.

4 participants