Old data shown after re-creating an index


Apologies if this has been asked before.

I'm new with ES (6.3) and i'm working through the process of how I want to index all my documents.

What I have found is after I delete the index, tweak the mappings and re-import the documents, when I retrieve a document it's showing old data.

I have updated the JSON document that is bulk uploaded, but it never shows the new information.

Does the id for each document have to change every time you re-upload it? Because I have left the id the same assuming that when you delete an index, the documents would be deleted as well.


If you delete the index and then reindex the data, there's zero chance Elasticsearch is holding onto old data because the old index no longer exists.

Any data that is being returned is based off the data that was (re)indexed into the new index.

Hi Mark,

Thanks. I'll have to retry, perhaps I wasn't successfully deleting the index.

Is there any chance that my browser could cache the response?


I guess so, but I wouldn't start down that path yet.

What are the actual command you are running?

Hi Mark

I just ran through my commands, and of course it worked perfectly! Always the way :roll_eyes:

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/_bulk?pretty' --data-binary @carq.json

health status index               uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   cars-2019.01.01     iNw3PouxQpa79TSLuHL-rA   5   1         10            0     50.6kb         50.6kb

DELETE /cars-2019.01.01
  "acknowledged": true

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/_bulk?pretty' --data-binary @carq.json

Previously I do recall seeing the docs.deleted value being 9 or 10 when I had the issue.

Thanks for your responses!


That'd mean you were over writing the data again. So maybe your delete didn't work?

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