Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k 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 (44.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. 

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Jul 18, 2019 in AWS by yuvraj (19.1k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.5k questions

29.9k answers


99.1k users

Browse Categories