Skip to content

Add metadata filtering to semantic_search_context#28

Merged
alex-feel merged 3 commits into
mainfrom
alex-feel-dev
Nov 30, 2025
Merged

Add metadata filtering to semantic_search_context#28
alex-feel merged 3 commits into
mainfrom
alex-feel-dev

Conversation

@alex-feel

Copy link
Copy Markdown
Owner

Add MetadataFilterValidationError exception and unified error handling for metadata filters in semantic search. Both search_context and semantic_search_context now return consistent error responses with validation_errors array for invalid operators.

Convert array values to strings for consistent type comparison in both
SQLite and PostgreSQL backends. SQLite also uses CAST for json_extract
results to ensure proper string comparison.
Add MetadataFilterValidationError exception and unified error handling
for metadata filters in semantic search. Both search_context and
semantic_search_context now return consistent error responses with
validation_errors array for invalid operators.
- Add tests for in/not_in operators with integer and mixed type arrays
- Add integration tests for invalid operator error handling
- Update semantic search tests to verify unified error responses
@github-actions

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  app
  query_builder.py 328-329, 353-355, 374-375, 397-399
  server.py 1867-1868, 1885-1897, 1906
  app/repositories
  embedding_repository.py 212-213, 225-231, 305-364
Project Total  

This report was generated by python-coverage-comment-action

@alex-feel alex-feel merged commit bed847c into main Nov 30, 2025
6 checks passed
@alex-feel alex-feel deleted the alex-feel-dev branch November 30, 2025 16:27
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