quickwit-oss / quickwit-oss/quickwit

error message for unquoted TermQuery over datetime field is unhelpful

Open
#3,409 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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:

  1. create an index with a datetime field
  2. run a query such as created_at:[2022-05-01T15:19:33Z TO 2022-05-01T15:19:33Z], it works
  3. run a query such as {"query":{"term":{"created_at":{"value":"2022-05-01T15:19:33Z"}}}} on the ES api, it works
  4. 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:

  1. Output of quickwit --version
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.