quickwit-oss / quickwit-oss/quickwit
error message for unquoted TermQuery over datetime field is unhelpful
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 11.7k
- Forks
- 597
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 37
Description
Describe the bug
TermQuery and TermSetQuery are not parsed properly when using the search api. Term works fine when using the ES compatible api.
Steps to reproduce (if applicable)
Steps to reproduce the behavior:
- create an index with a datetime field
- run a query such as
created_at:[2022-05-01T15:19:33Z TO 2022-05-01T15:19:33Z], it works - run a query such as
{"query":{"term":{"created_at":{"value":"2022-05-01T15:19:33Z"}}}}on the ES api, it works - run a query such as
created_at:2022-05-01T15:19:33Z, you get an error:Error: { "message": "Internal error:Failed to parse query:created_at:2022-05-01T15:19:33Z.`." }
Expected behavior
the request should succeed.
Configuration:
Please provide:
- Output of
quickwit --version - The index_config.yaml
version: 0.4
index_id: gh-archive-numericid-light
doc_mapping:
field_mappings:
- name: id
type: u64
fast: true
- name: org
type: json
tokenizer: default
type: datetime
fast: true
input_formats:
- rfc3339
precision: seconds
timestamp_field: created_at
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the unquoted datetime query through the search API and compare it with the working range query and Elasticsearch-compatible term request. Trace the TermQuery and TermSetQuery parsing path; done means the unquoted datetime request succeeds and the regression is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, rust
- Domain
- api, backend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100