Hi,
we use an index with products that have a default price. For certain
periods of time a product can have a special price.
The mapping looks like this at the moment:
"mappings" : {
"products" : {
"properties" : {
"defaultPrice" : { "type" : "float" },
"actionPrice" : {
"type" : "nested",
"properties" : {
"begin" : { "type" : "date", "format" :
"YYYY-MM-dd" },
"end" : { "type" : "date", "format" : "YYYY-MM-dd"
},
"price" : { "type" : "float" }
}
}, ...
The user can sort for the price. So in the query we need the logic that if
the current time is between a begin and end, then take this price else take
the defaultPrice. Is that possible? How can I do that?
Thanks
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8fc717a4-3a3d-4a60-b83b-67f417b47d8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.