Mismatch results between kibana and python dsl

Im trying to search over a uuid. I created the json query in the dev tools, and used search api function with python's elasticsearch-dsl, and got different results.

this is what i wrote in the dev tool:

GET index_name/type_name/_search
{
  "query": {
    "term": {
      "uuid": {
        "value": "uuid-value-1234"
      }
    }
  }
}

this returned one document

this is my search with elasticsearch-dsl:
es=Elasticsearch()

r = Search(using=es, index='index_name', doc_type='type_name').filter('term', uuid='uuid-value-1234')
result = r.execute()
result.hits.total
0

Im wondering why is there a difference? is the api filtering something?
thank you in advanced

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