Skip to content

Fix indexed integer range filter with float values#9054

Merged
timvisee merged 2 commits into
devfrom
fix-int-index-fractional-float-range
May 15, 2026
Merged

Fix indexed integer range filter with float values#9054
timvisee merged 2 commits into
devfrom
fix-int-index-fractional-float-range

Conversation

@timvisee

@timvisee timvisee commented May 15, 2026

Copy link
Copy Markdown
Member

Fixes #9049

A numeric range filter with float values behaves inconsistent when having an integer index. A range filter with gte: 1.5 would still match a value of 1.

Note this only affects filters when an integer index is created. If having a float index, or having no index at all, behavior is sound.

This adds a test to assert behavior. I've added a function for converting a float range into an integer range respecting integer bounds.

All Submissions:

  • My PR targets the dev branch (not master) and my branch was created from dev.
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@qdrant qdrant deleted a comment from coderabbitai Bot May 15, 2026
@timvisee timvisee merged commit a9a6351 into dev May 15, 2026
15 checks passed
@timvisee timvisee deleted the fix-int-index-fractional-float-range branch May 15, 2026 10:20
generall pushed a commit that referenced this pull request May 22, 2026
* Add test, assert integer range bounds work properly on float fractionals

* Use special float range conversion, respect integer bounds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working release:1.18.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants