eui icon indicating copy to clipboard operation
eui copied to clipboard

[SearchBar] `field_value_selection` filter in `and` mode only supports a single selection

Open PhaedrusTheGreek opened this issue 3 years ago • 0 comments

A query bar filter like this:

    {
      type: 'field_value_selection',
      field: 'type',
      name: 'Type',
      multiSelect: 'and',
      cache: 10000,
      options
    },

Generates query bar language like this:

type:elasticsearch type:logstash

However it seems that when converting via toESQuery(), only the first clause is translated:

{
    "bool": {
        "must": [
            {
                "match": {
                    "type": {
                        "query": "elasticsearch",
                        "operator": "and"
                    }
                }
            }
        ]
    }
}

Even after implementing a custom options.fieldValuesToQuery, still only the first value was iterated.

PhaedrusTheGreek avatar Sep 07 '22 18:09 PhaedrusTheGreek