# Search all indexes for document's parameter name or retrieve one document p/index

**URL:** <https://discuss.elastic.co/t/search-all-indexes-for-documents-parameter-name-or-retrieve-one-document-p-index/325175>\
**Category:** Elasticsearch\
**Created:** [February 9, 2023, 4:27pm UTC](https://discuss.elastic.co/t/search-all-indexes-for-documents-parameter-name-or-retrieve-one-document-p-index/325175 "2023-02-09T16:27:24Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![brunofl](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@brunofl](https://discuss.elastic.co/u/brunofl)\
**Post date:** [February 28, 2023, 10:48pm UTC](https://discuss.elastic.co/t/search-all-indexes-for-documents-parameter-name-or-retrieve-one-document-p-index/325175/6 "2023-02-28T22:48:31Z")

</div>

> [@brunofl](#):
>
> Is it possible to run a query on all indexes and retrieve one document per index?

I managed to solve this by using the \_mapping api set like this:

`GET */_mapping/field/<field-to-look-for>`  
can also use \* with field name in case to match more then one fields with name patterns

It returns the mapping of all the indexes that contain the field name. Than you can import it on python or do some data cleaning with your IDE.

For the other issue in update by query I replied here: in this [separate post](https://discuss.elastic.co/t/update-by-query-in-elasticsearch-dsl-matches-field-but-doesnt-match-object-field/325889/2) while looking for help.

---

_[View the full topic](https://discuss.elastic.co/t/search-all-indexes-for-documents-parameter-name-or-retrieve-one-document-p-index/325175)._
