Hello!
Is there any way to replicate "Surrounding Documents" function from Kibana but via API?
I'm trying different ways, but none is working (span_near, scroll API...).
Any help is appreciated!
Hello!
Is there any way to replicate "Surrounding Documents" function from Kibana but via API?
I'm trying different ways, but none is working (span_near, scroll API...).
Any help is appreciated!
Hi @elasticUser5
If you take a look at that Kibana do when requesting the surrounding documents, you can find that we are doing 3 searches:
remember to sort the documents request by the timestamp to get them in the correct order and use the https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-search-after
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.