0 votes
1 view
in AWS by (18.2k points)

How to join two separated indexes after matching query in elastic search?

For instance, I have two index called all_products and SourceTable. I want to combine two indexes based on product_id

{

    "_index": "all_products",

    "_type": "all_products",

    "_id": "123",

    "_score": 0.9808292,

    "_source": {

        "city": "CHENNAI",

        "product_id": "123",

        "name": "sam"

    }

},

{

    "_index": "sourcetable",

    "_type": "sourcetable",

    "_id": "232",

    "_score": 0.2876821,

    "_source": {

        "product_id": "123",

        "id": 232

    }

},

1 Answer

0 votes
by (42.4k points)

JOIN is not available in Elasticsearch.

if you are searching for customer_id = 100 in two indices. You will be returned with the documents that have customer_id = 100 separately for each index, there won't be a JOIN operation. 

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...