# Fetching Index - type relation

**URL:** https://discuss.elastic.co/t/fetching-index-type-relation/148607
**Category:** Elasticsearch
**Created:** [September 14, 2018, 10:43am UTC](https://discuss.elastic.co/t/fetching-index-type-relation/148607 "2018-09-14T10:43:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mseccbi](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mseccbi](https://discuss.elastic.co/u/mseccbi)
#### Post date: [September 14, 2018, 10:43am UTC](https://discuss.elastic.co/t/fetching-index-type-relation/148607/1 "2018-09-14T10:43:35Z")

</div>

I am trying to fetch index and its corresponding types in a single query. I tried using I tried using filter\_path search like this localhost:9200/\_search?filter\_path=hits.hits.\_index,hits.hits.\_type&pretty But if one index - one type contains multiple records, then the list is getting repeated. I need unique values i.e., index 1 - type 1, index 1- type 2, index 2 - type 1 like this. Pls provide suggestions

---

<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: [October 12, 2018, 10:43am UTC](https://discuss.elastic.co/t/fetching-index-type-relation/148607/2 "2018-10-12T10:43:35Z")

</div>

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