Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve search queries based on datetime #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adamlazik1
Copy link

@adamlazik1 adamlazik1 commented Jan 14, 2025

The current implementation causes issues such as:

  1. When searching for timestamps greater than the given value and
    minutes and seconds are omitted the value, it returns only timestamps
    greater than value + 1 hour.

  2. When searching for timestamps greater than the given value and only
    month is provided as the smallest time unit, it excludes only timestamps
    from the first day of the month in the results but includes rest of
    month. Based on the logic implemented here this should not happen but
    instead the whole month should be excluded from the search results, i.e.
    '> January 2024' should exclude all January timestamps.

Same problems occur when searching with <=.

This PR aims to fix these issues.

@adamlazik1 adamlazik1 force-pushed the fix-time-search branch 2 times, most recently from ee12200 to 21d2a9b Compare January 15, 2025 16:30
@adamlazik1 adamlazik1 marked this pull request as ready for review January 15, 2025 16:30
The current implementation causes issues such as:

1. When searching for timestamps greater than the given value and
minutes and seconds are omitted the value, it returns only timestamps
greater than value + 1 hour.

2. When searching for timestamps greater than the given value and only
month is provided as the smallest time unit, it excludes only timestamps
from the first day of the month in the results but includes rest of
month. Based on the logic implemented here this should not happen but
instead the whole month should be excluded from the search results, i.e.
'> January 2024' should exclude all January timestamps.

Same problems occur when searching with `<=`.

This PR aims to fix these issues.
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