Delete all documents with dot in field name


(Sergey) #1

Hi! Can I delete all documents with dots in field name? Need it for ES upgrade.


(Xavier Facq) #2

Hi, would it be possible for you to copy your index in a new one, without the field or renamed ?

https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-change-name


(Sergey) #3

Well! The problem is - I don't really know how many fields with dot I have. I need something
if (any field content ".")
delete document


(Xavier Facq) #4

Ok, maybe you can do that with a delete-by-query (or update-by-query) and a script inside.


(David Pilato) #5

Note that removing all documents which contain a dot in a field name won't change the existing mapping.
I doubt it solves your migration concern.

Why not trying to upgrade to 5.1 directly using reindex from remote API?
5.x allows in certain conditions IIRC dots in field names.


(system) #6

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