Elasticsearch-dsl-py: Match none DSL support

Created on 30 Jan 2018  路  2Comments  路  Source: elastic/elasticsearch-dsl-py

{
  "query": {
    "match_none": {}
  }
}

The match none query may sounds silly but is still usefull in some cases, I simply can't get it work using the elasticsearch-dsl-py library

s = Search.from_dict({
  "query": {
    "match_none": {}
  }
})

will raise exception

UnknownDslObject: DSL class `match_none` does not exist in query.

Is there a way to work around this API

Most helpful comment

Thank you for the issue, I added the match_none. In the meantime you can just use ~Q('match_all') which should be the same and, with the new release, will become MatchNone().

All 2 comments

Thank you for the issue, I added the match_none. In the meantime you can just use ~Q('match_all') which should be the same and, with the new release, will become MatchNone().

@HonzaKral thank you so much :heart:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

quasiben picture quasiben  路  4Comments

leoliuxd picture leoliuxd  路  4Comments

vanzi picture vanzi  路  4Comments

beanaroo picture beanaroo  路  4Comments

MauriJHN picture MauriJHN  路  4Comments