Sorting facets results

Hi
Is it possible to order the faceted results based on the avg calculated by
the facet. In my case a date_histogram facet.

sample result
"facets" : {
"date_facet"{
"_type" : "date_histogram",
"entries" : [
{
"time" : ,
"count" : ,
"min" : ,
"max" :23,
"total" : ,
"total_count" : ,
"mean" :
},
{
"time" : ,
"count" : ,
"min" : ,
"max" :32,
"total" : ,
"total_count" : ,
"mean" :
},
{
"time" : ,
"count" : ,
"min" : ,
"max" :12,
"total" : ,
"total_count" : ,
"mean" :
}
]
}
}
can i provide a scoring model where the faceted results get ordered based
on the "max" value calculated ?
how i want the results to be :
"facets" : {
"date_facet"{
"_type" : "date_histogram",
"entries" : [
{
"time" : ,
"count" : ,
"min" : ,
"max" :32,
"total" : ,
"total_count" : ,
"mean" :
},
{
"time" : ,
"count" : ,
"min" : ,
"max" :23,
"total" : ,
"total_count" : ,
"mean" :
},
{
"time" : ,
"count" : ,
"min" : ,
"max" :12,
"total" : ,
"total_count" : ,
"mean" :
}
]
}
}
thanks in advance.
Regards
Kuwar

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hey,

some facets support ordering (like the terms stats facet). The date
histogram facet is strictly counted up by the timestamp (as it is used as
aggregation base).
Sorting this on client side should not be too hard.

--Alex

On Thu, Jun 6, 2013 at 8:19 AM, kuwar sahani kuwarsahani@gmail.com wrote:

Hi
Is it possible to order the faceted results based on the avg calculated by
the facet. In my case a date_histogram facet.

sample result
"facets" : {
"date_facet"{
"_type" : "date_histogram",
"entries" : [
{
"time" : ,
"count" : ,
"min" : ,
"max" :23,
"total" : ,
"total_count" : ,
"mean" :
},
{
"time" : ,
"count" : ,
"min" : ,
"max" :32,
"total" : ,
"total_count" : ,
"mean" :
},
{
"time" : ,
"count" : ,
"min" : ,
"max" :12,
"total" : ,
"total_count" : ,
"mean" :
}
]
}
}
can i provide a scoring model where the faceted results get ordered based
on the "max" value calculated ?
how i want the results to be :
"facets" : {
"date_facet"{
"_type" : "date_histogram",
"entries" : [
{
"time" : ,
"count" : ,
"min" : ,
"max" :32,
"total" : ,
"total_count" : ,
"mean" :
},
{
"time" : ,
"count" : ,
"min" : ,
"max" :23,
"total" : ,
"total_count" : ,
"mean" :
},
{
"time" : ,
"count" : ,
"min" : ,
"max" :12,
"total" : ,
"total_count" : ,
"mean" :
}
]
}
}
thanks in advance.
Regards
Kuwar

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.