Elasticsearch always returns all results and queries or filters does not work

I am trying elasticsearch with about 300 million documents and try to test some filters and queries
suppose I have a type with name my_type and index my_index, with field my_field

when I run this query:

get /my_index/_my_type/_count

elastic returns :

 {
      "count": 301050195,
      "_shards": {
        "total": 5,
        "successful": 5,
        "failed": 0
      }
    } 

and when I try this query:

get /my_index/_my_type/_count
{
  "query":{
    "match": {
      "my_field": 'the text that does not appear at all !'
    }
    
  }
}

again elasticsearch returns this result:

{
  "count": 303604993,
  "_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
  }
}

It seem my query does not effect and all results return again ...
so what is the problem ?

This is very strange!
when I run this query:

get /my_index/_my_type/_search
{
fadsfasfasdf
asdfasfdasdfafd
fadfadfadf
}

all data returns again !

Try with GET instead of get.

Also tell from which tool you are running that.

this is funny :wink:
"GET" works correct

I use Dev Tools of Kibana 5.4

Ok so definitely use GET. You should see a red cross close to get indicating that something is wrong IIRC.

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