Skip to content

feat(index): enable flattened JSON queries - #5

Open
wirybeaver wants to merge 1 commit into
json-index-writerfrom
json-flat-query-semantics
Open

wirybeaver wants to merge 1 commit into
json-index-writerfrom
json-flat-query-semantics

Conversation

@wirybeaver

@wirybeaver wirybeaver commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Motivation

JSON queries need the same array-element boundaries in flat scans and indexed search. This completes the query path in #7445 on top of the write path, then enables flattened mode for new JSON indices.

Modification

A single AND Match query checks its terms within one sub-document. Separate Boolean clauses combine source rows. Both search paths keep the best score per row before applying the result limit.

JSON MatchQuery -> path / $idx constraints
                              |
                 +------------+-------------+
                 |                          |
             flat scan                indexed search
                 +------------+-------------+
                              |
                   best score per source row
                              |
                   Boolean row composition
                              |
                         result limit

Array positions remain exact during fuzzy value matching. Tokenization errors reach the caller, and combined-fields scoring rejects flattened JSON because it cannot preserve these constraints.

Test

Dataset tests compare nested-object matching with row-level Boolean composition across indexed and appended fragments. They also cover exact and wildcard paths, fuzzy positions, and rejection of combined-fields queries. The Python JSON integration test uses the new wildcard syntax.

@github-actions github-actions Bot added A-index bug Something isn't working labels Sep 30, 2026
@wirybeaver
wirybeaver added this pull request to stack #7 September 30, 2026 05:42
@wirybeaver
wirybeaver force-pushed the json-flat-query-semantics branch from ed8e209 to 8412042 Compare November 1, 2026 06:24
@wirybeaver
wirybeaver removed this pull request from stack #7 November 1, 2026 06:26
@wirybeaver
wirybeaver added this pull request to stack #8 November 1, 2026 06:26
@wirybeaver
wirybeaver removed this pull request from stack #8 November 1, 2026 21:27
@wirybeaver
wirybeaver force-pushed the json-flat-query-semantics branch from 8412042 to 8aa75c8 Compare November 1, 2026 21:27
@wirybeaver wirybeaver changed the title fix(index): enforce JSON array constraints in flat search feat(index): enable flattened JSON queries Nov 1, 2026
@wirybeaver
wirybeaver changed the base branch from json-memwal-subdocs to json-index-writer November 1, 2026 21:27
@wirybeaver
wirybeaver added this pull request to stack #9 November 1, 2026 21:27
@github-actions github-actions Bot added the enhancement New feature or request label Nov 1, 2026
@wirybeaver
wirybeaver removed this pull request from stack #9 November 1, 2026 21:40
@wirybeaver
wirybeaver force-pushed the json-flat-query-semantics branch from 8aa75c8 to 8ced7d6 Compare November 1, 2026 21:40
@wirybeaver
wirybeaver added this pull request to stack #10 November 1, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-index A-python bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant