I want to use the Geo-polygon query (Geo-polygon query | Elasticsearch Guide [7.13] | Elastic) inside an ingest pipeline and I've been thinking how to do it - as there is no query processor and the example for the geo polygon is with this type of query.
The reason for me trying to use this tool is to enrich documents which's country location is null, by checking their lat and lon fields and determining which country the doc is from.
It seems like the way to go for me, but when I'm trying this example I have too many coordinates in my Polygon shape that it does not fit in the queries in the DevTools. Is there any way to get the max query size up in DevTools?
Hey, I'm really close to having this all figured out - I'm creating a pipeline with an enrichment policy like you suggested and it works, but the coordinates used in the policy are very big.
When I'm getting a document through the pipeline the new enriched document has the fields I've specified in enrich_fields , but it also has the coordinates used to make the comparison. Is there any way to not add the coordinates field to every pipelined document?
Are you doing point in polygon match or polygon intersects match?
What does the actual enrich processor look like / take as arguments?
I think the match field is always returned.
The target_field used to store appended enrich data for incoming documents. This field contains the match_field and enrich_fields specified in your enrich policy.
You can always do a drop processor afterwards to get rid of that field.
I'm doing polygon intersects match with coordinates and lat, lon as input for the intersection.
Yeah seems like there is no way to exclude it, so I think I'll go with your option to get rid of it afterwards.
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.