Greetings,
My primary data store has a date_created field stored as a unix timestamp.
I've verified that if I multiply that value by 1000 and then index
it, Elasticsearch correctly picks the field up as a date. But updating the
data in my primary data store is not very feasible, therefore, I'm looking
for some way to have Elasticsearch do the conversion for me. Lazy, eh?
I've tried adding this to my mapping
"transform" : {
"script" : "ctx._source['date_created'] =
ctx._source['date_created'] * 1000;",
"lang": "groovy"
},
"properties" : { ...
I was expecting that to multiply the date_created field by 1000 prior to
parsing the field as a date, but it doesn't seem to be working.
Any ideas what I might be doing wrong, or suggestions for an alternate
approach?
Nick
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/5544e84b-06e5-4199-adff-17bd4039ac19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.