ef-labs / vertx-elasticsearch-service

Vert.x elasticsearch service with event bus proxying
57 stars 18 forks source link

Search does not support sort #8

Closed AlexThurston closed 9 years ago

AlexThurston commented 9 years ago

Based on this:

{
    "action": "search",
    "_index": <index>,
    "_indices": <indices>,
    "_type": <type>,
    "_types": <types>,
    "query": <query>,
    "filter": <filter>,
    "facets": <facets>,
    "search_type": <search_type>,
    "scroll": <scroll>,
    "size": <size>,
    "from": <from>,
    "fields": <fields>,
    "timeout": <timeout>
}

It doesn't appear as though the search 'action' support providing any form of sorting, ie: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-sort.html#_sort_values

Is this the case, or am I missing something?

adrianluisgonzalez commented 9 years ago

Looks like it is not currently supported. I'll try to add to the 2.0.0 version. Pull requests are always welcome.

AlexThurston commented 9 years ago

Looks like post filters are also not supported.

adrianluisgonzalez commented 9 years ago

You can use the "filter" json object field for post filters.

I've added support for "sort" in the vert.x 3 develop branch.