Hi,
I'm querying with a sort clause, and I'm getting unexpected results. I'm using the java client.
I'm sorting by a long timestamp field. The generated sort clause looks like this:
"sort" : [ {
"timestamp_ms" : {
"order" : "desc"
}
} ]
The main issue is that I'm getting five separate sorted groupings. There are five nodes in my cluster, so it would seem it is sorting per node, but that's just a guess.
A secondary issue is that it's sorting ascending, not descending.
Here is a sample of the results I am getting (timestamp formatted to a string for readability). After this block, there are four more similar sets of results, starting over at Oct 1.
How can I get es fully sort this result set?
Thu Oct 01 19:02:32 EDT 2015
Thu Oct 01 19:36:48 EDT 2015
Thu Oct 01 19:38:26 EDT 2015
Thu Oct 01 20:41:22 EDT 2015
Fri Oct 02 09:18:57 EDT 2015
Fri Oct 02 09:29:10 EDT 2015
Fri Oct 02 20:34:34 EDT 2015
Fri Oct 02 21:57:42 EDT 2015
Fri Oct 02 22:25:10 EDT 2015
Sat Oct 03 07:21:38 EDT 2015
Sun Oct 04 00:35:19 EDT 2015
Sun Oct 04 00:06:13 EDT 2015
Sun Oct 04 00:09:46 EDT 2015
Sun Oct 04 07:46:56 EDT 2015
Sun Oct 04 07:49:50 EDT 2015
Sun Oct 04 08:04:05 EDT 2015
Sun Oct 04 10:49:27 EDT 2015
Mon Oct 05 19:48:57 EDT 2015
Mon Oct 05 19:57:09 EDT 2015
Mon Oct 05 20:57:11 EDT 2015
Mon Oct 05 21:01:48 EDT 2015
Mon Oct 05 21:02:19 EDT 2015
Mon Oct 05 21:57:19 EDT 2015
Tue Oct 06 07:38:36 EDT 2015
Tue Oct 06 07:37:40 EDT 2015
Tue Oct 06 07:39:39 EDT 2015
Tue Oct 06 11:03:07 EDT 2015
Tue Oct 06 19:16:55 EDT 2015
Tue Oct 06 19:19:32 EDT 2015
Tue Oct 06 19:59:04 EDT 2015
Tue Oct 06 20:01:21 EDT 2015
Tue Oct 06 23:13:54 EDT 2015
Wed Oct 07 12:19:11 EDT 2015
Wed Oct 07 21:14:01 EDT 2015
Thu Oct 08 12:47:59 EDT 2015