Skip to content

Releases: jeansossmeier/elasticsearch-sql

v7.17.16.1

14 Nov 17:23
Compare
Choose a tag to compare

Release 7.17.16.1

Create nested sorting filter support

The below will sort by data.status.keyword ASC , with the nested path data and the filter conditions passed for the sorting.

SELECT * FROM index  
WHERE whatever = 'true' AND 
(
   nested('data', data.status IN ('Status')
   AND data.id_type=match_phrase(query=('ID_TYPE'), analyzer='standard', operator='AND'))
   AND (country IN ('US'))
)  
ORDER BY nested('data.status.keyword', 'data', (
    data.status IN ('Status') AND data.id_type=match_phrase(query=('ID_TYPE'), analyzer='standard', operator='AND')
   )
)