cakephp / elastic-search

Elastic search datasource for CakePHP
Other
88 stars 53 forks source link

Custom sort filter #108

Closed damianoporta closed 7 years ago

damianoporta commented 8 years ago

Hello, i need to use a custom filter inside the sort, is this supported? This is a piece of my query:

   "sort" : [
       {
          "applications.companies.date" : {
             "mode" :  "max",
             "order" : "desc",
             "nested_path" : "applications.companies",
             "nested_filter" : {
                "term" : { "applications.companies.id" : 41 }
             }
          }
       }
   ]

ref: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html

If it is not supported, any workaround? Thanks!

lorenzo commented 8 years ago

Have you tried passing an array in that format?

markstory commented 7 years ago

Closing for inactivity.