How to import GeoJSON into elastic search and Filter using a polygon

I want to import a collection of linestrings from GeoJSON into elastic search. The number of features that I want to import will be in the range of millions.

I am planning to show these features using Mapbox GL by querying features inside the current map bound at a time instead of loading all features into the map initially.

When map bound changes, I will trigger another search query using the new map bound. How can I do this? I have tried something as in this link

But it is not working as expected. Features returned are not inside the bound that i have requested. I am totally new to elastic search. Can someone help me on this

Hi @Surag_MT,

Can you share the query you are running?

With linestrings you would probably need to use a geo-shape query since geo-bounding box queries only work on points.

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