Query with NOT logic doesn't work in Kibana 6.5

When I want filter out some results, I use the '-' before the field name (in Kibana search bar according to this documentation: https://www.elastic.co/guide/en/elasticsearch/reference/6.7/query-dsl-query-string-query.html#_boolean_operators):

This creates the below query, which is obvious wrong:
"match": {
"-cs-ua-device": "Spider"

The above works in case I use "Add Filter" UI, and creates this query:
"must_not": [
{ "match_phrase": { "cs-ua-device.keyword": { "query": "Spider" } } }

Have you opted in to the new language features (e.g. autocomplete)? If so, the simplified syntax no longer supports - and +, you'll just use not instead.

Yep, I turned it on. Looks you are right. So the only thing I would add here is that I would expect this info in relevant documentation. By the way, is there a list of such changes that caused by new autocomplete feature?

This doc explains the new syntax. We're also working on better error messages that will detect when you're using the outdated syntax and link you to info about what has changed.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.