quickwit icon indicating copy to clipboard operation
quickwit copied to clipboard

Refactoring needed in the tag extraction code.

Open fulmicoton opened this issue 2 years ago • 0 comments

The extraction of tags for https://github.com/quickwit-oss/quickwit/pull/1634 highlighted a limitation in the way we manipulated queries.

The extraction of tags (extract_tags_from_query) operates on the UserInputAst, which is schema independent, and therefore, untyped.

This made it impossible for us to have support for user queries such as my_bool_tag_field:1, as tag pruning would translate into searching for the tag my_bool_tag_field:1 instead of my_bool_tag_field:true.

We need to: a) Either change the code that extracts tags b) Put that logic downstream, in the part that interprets the tag AST.

I suspect the change is deeper than might seem at first sight.

fulmicoton avatar Jun 21 '22 00:06 fulmicoton