Joining 2 indices in Elasticsearch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Joining 2 indices in Elasticsearch

shgeorge
Hi ES team
   Is it possible to join multiple indices based on a common id and apply filters?
Eg :
Index1 has 
      itemId, Desc, ProdId
Index2 has 
      ProdId and Price

We need to return all the items where the price is in a particular range. Is it possible without having all the data in 1 single index?


Thanks and regards
George

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Joining 2 indices in Elasticsearch

q42jaap

Hi George,

This is not possible, elasticsearch, like any NOSQL db, doesn't do joins. You can do it yourself, i.e. join in code, or use parent/child relations, or nested document.

Depending on your usecase, denormalizing the prices documents and deduping on product id may also be an option.

Jaap

On Apr 24, 2013 8:46 AM, "Sheeba George" <[hidden email]> wrote:
Hi ES team
   Is it possible to join multiple indices based on a common id and apply filters?
Eg :
Index1 has 
      itemId, Desc, ProdId
Index2 has 
      ProdId and Price

We need to return all the items where the price is in a particular range. Is it possible without having all the data in 1 single index?


Thanks and regards
George

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Joining 2 indices in Elasticsearch

Filippo Rossoni
In reply to this post by shgeorge
I found this interesting article http://blog.squirro.com/post/45191175546/elasticsearch-and-joining
look at parent/child relationship

Il giorno mercoledì 24 aprile 2013 08:46:41 UTC+2, george ha scritto:
Hi ES team
   Is it possible to join multiple indices based on a common id and apply filters?
Eg :
Index1 has 
      itemId, Desc, ProdId
Index2 has 
      ProdId and Price

We need to return all the items where the price is in a particular range. Is it possible without having all the data in 1 single index?


Thanks and regards
George

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.