Hello guys.
I'm playing with range facet but it's not working for me.
I'm running query as mentioned in guide :
Here is query
{
"query" : {
"match_all" : {}
},
"facets" : {
"range1" : {
"range" : {
"my_field" : [
{ "to" : 50 },
{ "from" : 20, "to" : 70 },
{ "from" : 70, "to" : 120 },
{ "from" : 150 }
]
}
}
}
}
And here is returned error:
{
"error": "SearchPhaseExecutionException[Failed to execute phase
[query], total failure; shardFailures {[QKlvaSVSTU-fJtjD0R4_9Q][deals][4]:
QueryPhaseExecutionException[[deals][4]:
query[ConstantScore(NotDeleted(:))],from[0],size[10]: Query Failed
[Failed to execute main query]]; nested:
ClassCastException[org.elasticsearch.index.field.data.strings.SingleValueStringFieldData
cannot be cast to org.elasticsearch.index.field.data.NumericFieldData];
}{[QKlvaSVSTU-fJtjD0R4_9Q][deals][1]:
QueryPhaseExecutionException[[deals][1]:
query[ConstantScore(NotDeleted(:))],from[0],size[10]: Query Failed
[Failed to execute main query]]; nested:
ClassCastException[org.elasticsearch.index.field.data.strings.SingleValueStringFieldData
cannot be cast to org.elasticsearch.index.field.data.NumericFieldData]; }]",
"status": 500
}
can anyone help me ?
Thanks.