opensearch-project / sql

Query your data using familiar SQL or intuitive Piped Processing Language (PPL)
https://opensearch.org/docs/latest/search-plugins/sql/index/
Apache License 2.0
121 stars 140 forks source link

[FEATURE] Add geo-spacial quering to sql #3151

Open sholomellenbogen opened 2 weeks ago

sholomellenbogen commented 2 weeks ago

Is your feature request related to a problem? I have 2 indexes, in 1 I have data that has polygons and the other index contains extra contextual data for each record. I need to be able to run a geo-spacial query (geo_shape) on the first index and join the results with the second index.

What solution would you like? Add a geo_shape function to sql so that I can do the entire query in sql to take advantage of the ability to join across multiple indexes.

What alternatives have you considered? And alternative I tried was to create a search-processor using a filter query. I had the processor do the geo-shape query and I tried to use a sql query to join that search pipeline result with the second index. I could not figure out (or there is no way) to invoke the search pipeline created by the processor in sql. If I could do this it would be an acceptable solution as well.