Conversation
Add an opt-in Cypher 25 SEARCH strategy with indexed metadata predicates while retaining the default procedure-based search. Include schema validation, Spring Boot configuration, documentation and fixed-vector tests for Neo4j 5.24 and 2026.01. Related to spring-projects#6990. Signed-off-by: HowieDeng <116950190+Shay-Deng@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current procedure-based search takes the global
topKcandidates before applying metadata filters. With five nearer nonmatching documents and ten farther matching documents, a filtered request for five results returns none.Add an opt-in Cypher 25
SEARCHstrategy for Neo4j 2026.01+ that applies supported metadata predicates inside vector index search. KeepVECTOR_QUERYas the default for compatibility. Expose the strategy and filterable metadata fields through the builder and Spring Boot properties, and document setup and restrictions.The new strategy supports equality and range comparisons joined with AND. Values are bound as parameters and identifiers are escaped. Unsupported predicates fail explicitly. Schema initialization creates filtering properties and rejects incompatible existing indexes without migrating them. Externally managed indexes remain the application's responsibility.
Related to #6990. This change addresses post-filtering behavior; it does not establish that the existing procedure bypasses its index or provide performance benchmark claims.
Validation:
verify, including 48 unit tests and 31 integration tests on Neo4j 5.24 and 2026.01, using fixed embeddings without provider API keys../mvnw clean packagepassed: all 169 reactor modules succeeded (JDK 25, Maven build cache disabled).