Skip to content
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

Raise SearchQueryParseError when HybridRetriever and HybridCypherRetriever encounters invalid Lucene string #286

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

willtai
Copy link
Contributor

@willtai willtai commented Feb 26, 2025

Description

This PR introduces SearchQueryParseError that gets raised when HybridRetriever and HybridCypherRetriever encounters invalid Lucene string.

For example, ~alien should raise an error as this is as the reserved character ~ is used incorrectly.

However, "alien~" is valid and should neither raise an error nor get processed (see Apache Lucene documentation).

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

@willtai willtai requested a review from a team as a code owner February 26, 2025 14:24
@willtai
Copy link
Contributor Author

willtai commented Feb 26, 2025

@CodiumAI-Agent /update_changelog

@CodiumAI-Agent
Copy link

Changelog updates: 🔄

[2025-02-26][https://github.com//pull/286]

Added

  • Introduced SearchQueryParseError for handling invalid Lucene query strings in HybridRetriever and HybridCypherRetriever.

to commit the new content to the CHANGELOG.md file, please type:
'/update_changelog --pr_update_changelog.push_changelog_changes=true'

@willtai willtai force-pushed the lucene-special-characters-handling branch from cfbec51 to 7856527 Compare February 28, 2025 11:27
@willtai willtai requested a review from stellasia February 28, 2025 13:37
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.

3 participants