# Geoshape query with pre-indexed shape and other fields?

**URL:** <https://discuss.elastic.co/t/geoshape-query-with-pre-indexed-shape-and-other-fields/291192>\
**Category:** Elasticsearch\
**Created:** [December 8, 2021, 8:32am UTC](https://discuss.elastic.co/t/geoshape-query-with-pre-indexed-shape-and-other-fields/291192 "2021-12-08T08:32:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GavinBeattie](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@GavinBeattie](https://discuss.elastic.co/u/GavinBeattie)\
**Post date:** [December 8, 2021, 8:32am UTC](https://discuss.elastic.co/t/geoshape-query-with-pre-indexed-shape-and-other-fields/291192/1 "2021-12-08T08:32:07Z")

</div>

From the reference guide, it is possible to search geopoints by shapes contained in another index. This has a certain appeal for some analysis that I am trying to do akin to geofencing.

> **[Geoshape query | Elasticsearch Guide \[7.16\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-query.html#_pre_indexed_shape)**

I would like to know if it is possible to add other fields to the shapes index and include them in the query. The idea is to have an index of shapes to build up speed traps, hence, the additional fields would be a maximum and minimum. Thus, when gps data including lat, lon and speed is queried it would return any exceedences.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 5, 2022, 8:32am UTC](https://discuss.elastic.co/t/geoshape-query-with-pre-indexed-shape-and-other-fields/291192/2 "2022-01-05T08:32:14Z")

</div>

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