Skip to content

Support negation and decimal literals in OData filter queries#28

Merged
paulirwin merged 1 commit into
mainfrom
odata-negation-and-decimal-support
Apr 23, 2026
Merged

Support negation and decimal literals in OData filter queries#28
paulirwin merged 1 commit into
mainfrom
odata-negation-and-decimal-support

Conversation

@paulirwin
Copy link
Copy Markdown
Member

Summary

  • Handle not <field> <op> <value> OData expressions (parsed as (not <field>) <op> <value>) by wrapping the comparison in a MUST_NOT boolean clause in ODataQueryVisitor.
  • Add decimal literal support and switch float range queries to NewDoubleRange across all comparison helpers, so filters match how numeric fields are indexed.
  • Add a new AzureSearchEmulator.UnitTests xUnit project covering ODataQueryVisitor and LuceneNetIndexSearcher (105 tests passing).

Test plan

  • dotnet test AzureSearchEmulator.UnitTests/AzureSearchEmulator.UnitTests.csproj — 105/105 pass
  • CI green on PR

🤖 Generated with Claude Code

Adds handling for "not <field> <op> <value>" expressions, which OData
parses as "(not <field>) <op> <value>", by wrapping the underlying
comparison in a MUST_NOT boolean clause. Also adds decimal literal
support and switches float range queries to double ranges to match
how numeric fields are indexed. Introduces an xUnit test project
covering the visitor and LuceneNetIndexSearcher.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@paulirwin paulirwin merged commit 8f23e0b into main Apr 23, 2026
2 checks passed
@paulirwin paulirwin deleted the odata-negation-and-decimal-support branch April 23, 2026 17:01
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