Elasticsearch query SQL Server LAG function analog

(Dmitriy Shilonosov) #1


I am looking for a SQL Server LAG
analog in Elasticsearch.

Assume I have a list of documents in result set found by particular
criteria. The result set is also ordered in some order.

I know the id of one of the documents in that result set and I need to find
next and/or previous document in the same result set.

SQL Server 2012 and above has LAG/LEAD functions to get next/previous row
in the recordset. So I wondering if there is such functionality in the

Could you please point me on the corresponding documentation/examples

Here is my question on
stackoverflow: http://stackoverflow.com/questions/24779002/elasticsearch-query-sql-server-lag-function-analog
in case if you'd like to share knowledge there.


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9321fae0-7b55-4c85-bae5-49875859974c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

(system) #2