Create a geo-shape document from several other location documents

Hello,

I get several documents with a location inside. At the end of a period, I want to collect all the locations to create a new document which will be the route of those points (linestring)

How can I do that? Pipelines seems to alter the document itself and watcher seems to have basic actions (except webhook).

Is there a simple way or a snippet for that?

best

Hi Dao,

I do not know of any great ways to do this as of now. We are working on a new aggregation called geo_line, which will create a line-string from a bucket of points: https://github.com/elastic/elasticsearch/pull/41612.

Another option you can explore for the interim is to use a top-hits aggregation (which is limited to number of results) within a watch to fetch some points for a specific time period together sorted and then create a new document with that data.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.