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

Be able to use range query with values containing space #2334

Open
quanghungb opened this issue Mar 25, 2024 · 2 comments
Open

Be able to use range query with values containing space #2334

quanghungb opened this issue Mar 25, 2024 · 2 comments

Comments

@quanghungb
Copy link

quanghungb commented Mar 25, 2024

Is your feature request related to a problem? Please describe.
I have millions of lines around a quite short time range that have been ingested in Quickwit with Fluent Bit.
Example of a log record (other fields are omitted):

{
  "level": "INFO",
  "log": "Log message",
  "timestamp": "2024-03-04 16:46:03.905261"
}

I would like to find all the logs that have been generated between 2 dates like this following example

timestamp:["2024-03-04 16:45:00" TO "2024-03-04 16:46:03"]

But it does not work as I got this following error message (in Quickwit UI or in the Grafana Quickwit plugin)

Status: 400
Error: { "message": "failed to parse query: `timestamp:[\"2024-03-04 16:45:00\" TO \"2024-03-04 16:46:03\"]`" }

Therefore I cannot narrow the search a specific time range. It seems to be that the range query with values containing spaces don't work.

Describe the solution you'd like
I would like to be able to run search range queries with values containing space. It should work like the example given in the documentation here: Range field:[low_bound TO high_bound}.

My following request should return all the logs that have the timestamp in the given time range

timestamp:["2024-03-04 16:45:00" TO "2024-03-04 16:46:03"]

Additional information

  • Quickwit version
"build": {
    "build_date": "2024-03-22T17:55:00Z",
    "build_profile": "release",
    "build_target": "x86_64-unknown-linux-gnu",
    "cargo_pkg_version": "0.8.0",
    "commit_date": "2024-03-22T17:37:52Z",
    "commit_hash": "0950b031ab021acb19f1023b45a9e2dad7ec19b1",
    "commit_short_hash": "0950b03",
    "commit_tags": [
      "qw-guilload"
    ],
    "version": "0.8.0-nightly"
  },
  • Does the following request could make sense?
timestamp:["2024-03-04 16:45:00" ~ 5min]

It would be equivalent to have the time range [t-5min TO t+5min]

Thanks!

@PSeitz
Copy link
Contributor

PSeitz commented Mar 27, 2024

Can you share your config?

@fulmicoton
Copy link
Collaborator

The query parser expects you date in the format rfc3339.
In this format, the space is replaced by a T

timestamp:[2024-03-04T16:45:00 TO 2024-03-04T16:46:03]

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

No branches or pull requests

3 participants