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

Handling several indexes per datasource #2

Open
fmassot opened this issue May 14, 2023 · 1 comment
Open

Handling several indexes per datasource #2

fmassot opened this issue May 14, 2023 · 1 comment
Assignees

Comments

@fmassot
Copy link
Contributor

fmassot commented May 14, 2023

Currently, a quickwit datasource requires to define an index.

We want a user to be able to query different indexes (using the index pattern) or query multiple indexes with a single datasource.

Here is the proposed spec.

Datasource parameters

  • timestamp field(mandatory): This field is used across all views and ensures that all indexes used are on the same timestamp field. We could make it optional but we currently don't support querying multiple indexes with different timestamp fields.
  • timestamp output format (mandatory): we don't want the user to set this value, but I think we don't really have the choice for now. This format is used by the Grafana plugin to show correctly the datetime. We could guess the format at the backend plugin level though.
  • default index(optional): either an index ID or an index pattern or empty.

Query builder

We should add an index field filled with the default value in the query builder.

Validation

If an index or index pattern is defined, we can validate the timestamp field and timestamp field output format.

@ddelemeny
Copy link
Contributor

Knowing the timefield is a requirement at request time, but with an index pattern it is impossible to know what the field is because index metadata can't be retrieved.

A solution would be to use a known alias for the field ($__timefield, auto), and have quickwit infer the value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants