aquasecurity / esquery

An idiomatic Go query builder for ElasticSearch
Apache License 2.0
305 stars 57 forks source link

Sort support #5

Closed dcardamo closed 4 years ago

dcardamo commented 4 years ago

Hi,

First thanks for creating this package. Its coming at a good time because I need a flexible query builder given criteria user's input and I found your package was just released.

One feature I think I need is the ability to sort fields. Looking at the package docs I don't see how I can do that. Would this be a feature you'd consider adding?

Here are the ES docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-sort

Thanks!

dcardamo commented 4 years ago

Ah my bad. I think Sort is supposed be done on the espapi.Search().WithSort().