Skip to content

Conversation

@dontang97
Copy link

Summary

In the logic for performing full-text search on edges, if a document is found in OpenSearch’s edge_name_and_fact index, the UUID of that document is used as a parameter to further query Neptune for the related triplet. The MalformedQueryException occurs at this stage due to a syntax error in the Neptune query. In the query source code shown below, the cause of the MalformedQueryException is that the filter_query contains its own WHERE clause, resulting in the overall query having two WHERE clauses, which is invalid syntax.

error log: graphiti_core.driver.neptune_driver: Error executing query: {'message': 'An error occurred while executing the query.', 'details': "An error occurred (MalformedQueryException) when calling the ExecuteOpenCypherQuery operation: Invalid input 'H': expected 'i/I' (line 6, column 27 (offset: 231))"}

Type of Change

  • Bug fix
  • New feature
  • Performance improvement
  • Documentation/Tests

Objective

For new features and performance improvements: Clearly describe the objective and rationale for this change.

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • All existing tests pass

Breaking Changes

  • This PR contains breaking changes

If this is a breaking change, describe:

  • What functionality is affected
  • Migration path for existing users

Checklist

  • Code follows project style guidelines (make lint passes)
  • Self-review completed
  • Documentation updated where necessary
  • No secrets or sensitive information committed

Related Issues

Closes #[issue number]

@dontang97 dontang97 force-pushed the fix/edge_fulltext_search_neptune_malformed_query_exception branch from 0266d1c to 75019b9 Compare October 30, 2025 09:07
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.

1 participant