We are using synthetic _source
and date
fields with format defined as epoch_millis
. Our expectation would be to get such fields as long number but we get them as strings.
As we understand it might be necessary when dates are being stored in most other formats, in this one it is odd.
Currently we got following from the search API:
{
...
"hits" : {
...
"hits" : [
{
...
"_source" : {
"_created" : "1608193593998",
...
}
},
...
]
}
}
for mapping:
{
"index_name" : {
"mappings" : {
"_source" : {
"mode" : "synthetic"
},
"properties" : {
"_created" : {
"type" : "date",
"format" : "epoch_millis"
},
...
}
}
}
}
Is there a way to configure mapping the way that we get our date
fields in epoch_millis
format as long
numbers even with synthetic
_source
please?
Expected search API output:
{
...
"hits" : {
...
"hits" : [
{
...
"_source" : {
"_created" : 1608193593998,
...
}
},
...
]
}
}