# Disptached index, is it possible to filter across indexes by another index value?

**URL:** <https://discuss.elastic.co/t/disptached-index-is-it-possible-to-filter-across-indexes-by-another-index-value/276920>\
**Category:** Elasticsearch\
**Created:** [June 24, 2021, 11:24am UTC](https://discuss.elastic.co/t/disptached-index-is-it-possible-to-filter-across-indexes-by-another-index-value/276920 "2021-06-24T11:24:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugo\_Martin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_martin/32/90763_2.png) [@Hugo\_Martin](https://discuss.elastic.co/u/Hugo_Martin)\
**Post date:** [June 24, 2021, 11:24am UTC](https://discuss.elastic.co/t/disptached-index-is-it-possible-to-filter-across-indexes-by-another-index-value/276920/1 "2021-06-24T11:24:46Z")

</div>

Hi everyone,  
I'm pretty new to ELK and I have few questions about indexes relations.

Some context: we use MongoDB as database to interract with microservices, and use [monstache](https://rwynn.github.io/monstache-site/) to sync Mongo and ES, it works perfectly. So we get a list of indexes:

- configuration.city
- configuration.district
- customers.shop

Now, here is _one_ of my problems...

I have a model (index) Shop which is link by an ID to a District, which is link to a City.  
Is it possible to create a filter like "I would like all shops in New-York" ?  
On other systems, it would be someting like "GET all districts of this city =\> GET shops from these districts".

Shop object:

```auto
{
        "_index" : "customers.shop",
        "_type" : "_doc",
        "_id" : "60cc98fa444814001df0045f",
        "_score" : 1.0,
        "_source" : {
          "__v" : 0,
          "address" : {
            "district" : "60cc8a4f7df507002126d600",
          }
}

```

District object:

```auto
{
        "_index" : "configuration.district",
        "_type" : "_doc",
        "_id" : "60cc8a4f7df507002126d600",
        "_score" : 1.0,
        "_source" : {
          "__v" : 0,
          "city" : "60cc88c97df507002126d5ff",
        }
      }

```

City object:

```auto
{
        "_index" : "configuration.city",
        "_type" : "_doc",
        "_id" : "60cc88c97df507002126d5ff",
        "_score" : 1.0,
        "_source" : {
          "__v" : 0,
          "coefficients" : [
            1
          ],
          "label" : "New-York",
          "status" : "draft",
        }
      }

```

I know it sounds weird and if it's not possible , I need to know, because I thought ES was able to index all the data together.

Thanks a lot !

Hugo Martin

---

<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:** [July 22, 2021, 11:25am UTC](https://discuss.elastic.co/t/disptached-index-is-it-possible-to-filter-across-indexes-by-another-index-value/276920/2 "2021-07-22T11:25:00Z")

</div>

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