rwynn / monstache-site

documentation for the monstache project
https://rwynn.github.io/monstache-site/
MIT License
22 stars 31 forks source link

How to change specific _mapping field type #13

Open onhernandes opened 5 years ago

onhernandes commented 5 years ago

How can I change specific _mapping field type sent to ElasticSearch?

I've a collection of objects with a field called metadata, which is populated by users, so I don't know all the keys in that object. Monstache automatically updates the index mapping for me, but I want to set everything explicitly to string instead date because some of the data are malformed.

I'm thinking about mapping the doc with a custom script and then patching the fields, but I wanted to know if I can change mapping field types

rwynn commented 5 years ago

Monstache just sends data to Elasticsearch. To control how that data is indexed you would need to configure on the Elasticsearch side.

Take a look at this

and in general

onhernandes commented 5 years ago

Oh, thank you!