Skip to content

use correct precision level for fastfield-based termquery on datetime#6027

Merged
trinity-1686a merged 1 commit intomainfrom
trinity.pointard/termquery-datetime
Dec 18, 2025
Merged

use correct precision level for fastfield-based termquery on datetime#6027
trinity-1686a merged 1 commit intomainfrom
trinity.pointard/termquery-datetime

Conversation

@trinity-1686a
Copy link
Contributor

Description

when querying indexed timestamps, we truncate dates to the second, as that's how they are stored inside the index, however when querying a non-indexed, fast field, we still do that truncation. This result in queries not matching when they should (or matching when they shouldn't if a doc has a timestamp with no sub-second value, but the query has a sub-second value). This PR make it so when we're about to run a datetime termquery over fastfield, we search for a value with the precision of the fastfield, and not the precision of an sstable

How was this PR tested?

added unit test

@trinity-1686a trinity-1686a merged commit 29734d4 into main Dec 18, 2025
8 checks passed
@trinity-1686a trinity-1686a deleted the trinity.pointard/termquery-datetime branch December 18, 2025 13:53
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.

2 participants