A while back, I wrote my own post-query response sorting so that I could handle cases that Elasticsearch didn't. One case was sorting a scan query. I used a Java TreeSet class and could also limit it to the top 'N' (configurable) items. It is very, very quick, pretty much adding no overhead to the existing scan logic. And it supports an arbitrarily complex compound sort key, much like an SQL ORDERBY statement; it's very easy to construct.
Probably not useful for a normal user query, but it is very useful for an ad-hoc query in which I wish to scan across an indeterminately large result set but still sort the results. One of these days, it might make a good plug-in candidate. But I am not sure how to integrate it with the scan API, so for now it's just part of the Java client layer. Brian -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/74e311f5-ae54-4da1-9369-567e7bf03272%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.