I have documents in my index that have a field whose value is a string of numbers, "." and
-. I want to remove those
- from the values and change the field type to an integer.
I can have these removed before I feed my data to elasticsearch, but then I still have the problem with the existing indexed documents.
I believe the solution is to define an ingest node and add it to the a new index's mapping, then reindex and alias the old one. However I simply can't write the conditional removal of
- using painless in a script preprocessor! And I didn't understand the documentation.
How do I write it?!