Skip to content

Conversation

@paulirwin
Copy link
Member

Summary

Adds full support for Azure Search's search.ismatch and search.ismatchscoring OData filter functions, enabling full-text search within filter expressions.

  • Implement search.ismatch(searchText) to search all searchable fields
  • Implement search.ismatch(searchText, fieldName) to search specific field
  • Implement search.ismatch(searchText, 'field1,field2') to search multiple fields
  • Support search.ismatchscoring() variant for relevance scoring
  • Support optional parameters: queryType ('simple'/'full') and searchMode ('any'/'all')
  • Add support for NOT operator and comparison operators (lt, le, gt, ge, ne)

Test Plan

  • ✅ Basic search.ismatch query on all searchable fields
  • ✅ Field-specific searches (single and multiple fields)
  • ✅ search.ismatchscoring variant
  • ✅ Combined filters with AND operators
  • ✅ Negation with NOT operator
  • ✅ Comparison operators in filters
  • ✅ All 14 integration tests pass (7 new tests for search.ismatch functionality)

Fixes #11

🤖 Generated with Claude Code

…ions

Add full support for Azure Search's search.ismatch and search.ismatchscoring
OData filter functions, enabling full-text search within filter expressions.

Changes:
- Add ODataQueryVisitor constructor to accept SearchIndex parameter
- Implement VisitSearchIsMatch() and VisitSearchIsMatchScoring() methods
- Add BuildFullTextSearchQuery() to parse function arguments and delegate to
  appropriate query parser based on queryType (simple/full)
- Implement ParseSimpleQuery() and ParseFullQuery() using SimpleQueryParser
  and StandardQueryParser with per-field analyzers
- Support field restriction for single or multiple fields
- Add support for NOT operator (UnaryOperatorToken)
- Add support for comparison operators (lt, le, gt, ge, ne)
- Update LuceneNetIndexSearcher.GetFilterFromRequest() to pass SearchIndex
  to ODataQueryVisitor
- Add 7 comprehensive integration tests covering all function variants

Fixes #11

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@paulirwin paulirwin merged commit 7485ef0 into main Nov 20, 2025
2 checks passed
@paulirwin paulirwin deleted the issue/11 branch November 20, 2025 22:30
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.

Support for search.ismatch and search.ismatchscoring filters

2 participants