Conversation

Replying to
performance issue related to the sort order. If one chooses "created_at" as the key for the index and selects "desc" for descending sort, queries that utilize that specific sort direction are optimized. However, if a query specifies the opposite sort direction, the performance is
1
much slower. I'm not sure if this is an Elasticsearch issue or a Lucene issue, so I tagged both for this discussion. As a side example using Postgres, if an index is created on a column and a sort direction is specified, the index can still be used when sorting in the opposite
1
direction. I'm curious why the performance is much worse in Elasticsearch when a query specifies a sort direction opposite of them direction originally specified when creating the index. It is almost as if the index isn't even used if the sort direction is the opposite of what is
1