I would like to sort the results of a query such that all of the records with a value of true in the expires field will be at the top. I am not using relevance for sorting. I tried adding this as a sort, but it doesn't seem to work with either sorting order: { expires: { order: "desc" } }
All of the records are in the result but they aren't sorted. Is there a different way I should be going about this? For reference, here is my entire query: { "query": { "match_all": { } }, "size": 50, "from": 0, "fields": [ "id" ], "sort": [ { "expires": { "order": "desc" } } ] } -- 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/0bfc5579-8855-44a8-97e3-58ede3bb10d4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.