Elastic Search Request Body search by _type

I am doing a query like so:

curl -XGET localhost:9200/logstash*/_search
{
  "query": {
    "match": {
      "_type": "xxx"
    }
  }
}

I have deleted all the documents of type xxx, by curl -XDELETE localhost:9200/logstash*/xxx
but the above query is still giving me results in elasticsearch.

But if I do search with this: curl -XGET localhost:9200/logstash*/xxx/_search, without request body, there are no results.

Could yo pls help in what is going on here?

Found this thread Should filtering by type and type-specific search URL return different results? but does not really help

What kind of results are you getting? What type do they have? Do they have a field named _type that doesn't match their actual type but contains xxx?

Hello,

I am getting documents of _type:"xxx" in the logstash indexes, which I already deleted by using command curl -XDELETE localhost:9200/logstash*/xxx.

The _type and type field for all these documents is "xxx". i.e same. Hope this helps.

Thanks

Hmm, this is really puzzling. The only idea that I had is that the _type field inside the record doesn't match the real type of the record and it confuses the search engine. If this is not the case, it would be great if you could show how to recreate this problem. Please see https://www.elastic.co/help for some guildlines on how to post a recreation.