# How to query for a documents based on the type of a field?

**URL:** <https://discuss.elastic.co/t/how-to-query-for-a-documents-based-on-the-type-of-a-field/280620>\
**Category:** Elasticsearch\
**Created:** [August 6, 2021, 7:59am UTC](https://discuss.elastic.co/t/how-to-query-for-a-documents-based-on-the-type-of-a-field/280620 "2021-08-06T07:59:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![k1b](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/k1b/32/92331_2.png) [@k1b](https://discuss.elastic.co/u/k1b)\
**Post date:** [August 6, 2021, 7:59am UTC](https://discuss.elastic.co/t/how-to-query-for-a-documents-based-on-the-type-of-a-field/280620/1 "2021-08-06T07:59:02Z")

</div>

I have a geoip.loc field, of type geo\_point.  
A few documents accidentally got added into the index with this field as (a pair of) float, which is now causing a mapping conflict.  
I'd like to query for these few documents, and then delete these fields to resolve the conflict. Even better would be to convert these floats to geo\_point.

---

<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:** [September 3, 2021, 7:59am UTC](https://discuss.elastic.co/t/how-to-query-for-a-documents-based-on-the-type-of-a-field/280620/2 "2021-09-03T07:59:35Z")

</div>

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