How to join two index

I've tried using aliases (aliases a and b) the results alert The data you are seeing might be incomplete or wrong. in the field at index b. Please help me

POST /_aliases
{
    "actions" : [
        { "add" : { "index" : "a", "alias" : "join_a_and_b"} },
        { "add" : { "index" : "b", "alias" : "join_a_and_b"} }
    ]
}

Can you elaborate more on what you are trying to do here?

Aliases allows you to query sets of indices using a short name rather than listing all indices individually. Elasticsearch does however not support joins between documents even if you have an aluas in place. If you can provide an example of what you are trying to achieve it may be easier to provide guidance.

You can use enrichment processor for this, but both indexes must have one field in common.

Reindexing needs to be performed in this method.

Ex-Enrich fields in new index from other index present in kibana using logstash

thank you for replying to this discussion quickly.
so i hope like join in sql

example
index a - transaction
id
location_id
name
date_report

index b - master holidays
location_id
holiday date

expectation
id
location_id
name
date_report
holiday date

when you want to use holiday date on kibana use top hit the result is
The data you are seeing might be incomplete or wrong
when or empty data

You cannot do that in Elasticsearch without reindexing into a new index that contains all that information, as @Divyank_Mahalle mentioned.

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