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

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 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:

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

District object:

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

City object:

{
        "_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

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