Skip to content

Support Neo4j 2026 vector SEARCH with CYPHER 25 and procedure fallback#550

Open
zeljkoagic wants to merge 1 commit into
mainfrom
neo4j-2026-vector-search
Open

Support Neo4j 2026 vector SEARCH with CYPHER 25 and procedure fallback#550
zeljkoagic wants to merge 1 commit into
mainfrom
neo4j-2026-vector-search

Conversation

@zeljkoagic

@zeljkoagic zeljkoagic commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Description

Summary

Makes VectorRetriever and VectorCypherRetriever work on Neo4j 2026+ when the SEARCH vector syntax is used.

Problem

On Neo4j ≥ 2026.1 the library uses SEARCH-based vector queries. These can fail with Invalid input 'SEARCH' on default Cypher databases. Today we only fall back to db.index.vector.queryNodes on PropertyNotFound, so many failures are not recovered.

Reproducing the issue (on main, without the fix):

  1. Use Neo4j 2026+, e.g., demo.neo4jlabs.com (recommendations DB).
  2. Run VectorRetriever or VectorCypherRetriever with a text query (any embedder).
  3. The library picks the SEARCH vector path (Neo4j ≥ 2026.1).
  4. Query fails with Invalid input 'SEARCH', SEARCH syntax isn’t accepted without CYPHER 25, and main only falls back to the old procedure on PropertyNotFound, not this error.

Solution

  • Prefix SEARCH queries with CYPHER 25 where needed.
  • Broaden fallback to retry with procedure-based vector search on SEARCH/CYPHER25-related errors.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Complexity: Low

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • Manual tests

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated
  • Examples have been updated
  • New files have copyright header
  • CLA (https://neo4j.com/developer/cla/) has been signed
  • CHANGELOG.md updated if appropriate

@zeljkoagic zeljkoagic self-assigned this Jun 25, 2026
@zeljkoagic zeljkoagic marked this pull request as ready for review June 25, 2026 08:54
@zeljkoagic zeljkoagic requested a review from a team as a code owner June 25, 2026 08:54
@zeljkoagic zeljkoagic added the bug Something isn't working label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant