Join multiple index to search result

Hi,

I am using ElasticSearch ver. 6.2.3 and I have created three indexes

  1. MasterSubscribers
  2. CustomSubscriber1
  3. CustomSubscriber2

each of these have common doc type "Subscriber"

All these indexes currently have data which we pushed from 3 SQL databases. Master may or may not have all subscribers details.
If Subscriber is not found under 1st index then it should search under 2 & 3 index.

How can i write query for this? Can i join multiple indexes?

Thanks!

Hi,

Do you want to join the indexes and find common fields or search for a field across indices?

If you want to search for a field across indices, you can use the Multi-index api to do so easily. Let me know if this helps.

https://www.elastic.co/guide/en/elasticsearch/guide/current/multi-index-multi-type.html

Regards,
N

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