Does ES support cross-index parent/child relationship? More specifically, can I have all the parents in one index (say users) and the children (say events) in a multiple time series style (managed by curator) indices? If so, how is this done? If not, what's the alternative?
On Jun 24, 2014, at 6:48 PM, Drew Kutcharian drew@venarc.com wrote:
Hi!
Does ES support cross-index parent/child relationship? More specifically, can I have all the parents in one index (say users) and the children (say events) in a multiple time series style (managed by curator) indices? If so, how is this done? If not, what's the alternative?
Unfortunately this is not supported by elasticsearch, the parent document
and the child document must be under the same index or else the rounting
will not be established. You can either try coping the parent document if
they are not many or you can use an other way to split your data like with
a hash function and to ensure that both parent and child document will be
indexed into the same index.
Hope it helps
Thomas
On Wednesday, 25 June 2014 04:48:48 UTC+3, Drew wrote:
Hi!
Does ES support cross-index parent/child relationship? More specifically,
can I have all the parents in one index (say users) and the children (say
events) in a multiple time series style (managed by curator) indices? If
so, how is this done? If not, what’s the alternative?
Unfortunately this is not supported by elasticsearch, the parent document
and the child document must be under the same index or else the rounting
will not be established. You can either try coping the parent document if
they are not many or you can use an other way to split your data like with
a hash function and to ensure that both parent and child document will be
indexed into the same index.
Hope it helps
Thomas
On Wednesday, 25 June 2014 04:48:48 UTC+3, Drew wrote:
Hi!
Does ES support cross-index parent/child relationship? More specifically,
can I have all the parents in one index (say users) and the children (say
events) in a multiple time series style (managed by curator) indices? If
so, how is this done? If not, what’s the alternative?
Thanks Matt, that feature is exactly what we need. One thing I couldn't figure out was that I would be able to pass a routing key so only relevant shards would be queried, right?
Unfortunately this is not supported by elasticsearch, the parent document and the child document must be under the same index or else the rounting will not be established. You can either try coping the parent document if they are not many or you can use an other way to split your data like with a hash function and to ensure that both parent and child document will be indexed into the same index.
Hope it helps
Thomas
On Wednesday, 25 June 2014 04:48:48 UTC+3, Drew wrote:
Hi!
Does ES support cross-index parent/child relationship? More specifically, can I have all the parents in one index (say users) and the children (say events) in a multiple time series style (managed by curator) indices? If so, how is this done? If not, what's the alternative?
I have not tested routing but I did put that functionality in so it should
work fine. Let me know if you have any issues!
Thanks,
Matt Weber
On Thu, Jun 26, 2014 at 7:20 PM, Drew Kutcharian drew@venarc.com wrote:
Thanks Matt, that feature is exactly what we need. One thing I couldn’t
figure out was that I would be able to pass a routing key so only relevant
shards would be queried, right?
Unfortunately this is not supported by elasticsearch, the parent document
and the child document must be under the same index or else the rounting
will not be established. You can either try coping the parent document if
they are not many or you can use an other way to split your data like with
a hash function and to ensure that both parent and child document will be
indexed into the same index.
Hope it helps
Thomas
On Wednesday, 25 June 2014 04:48:48 UTC+3, Drew wrote:
Hi!
Does ES support cross-index parent/child relationship? More
specifically, can I have all the parents in one index (say users) and the
children (say events) in a multiple time series style (managed by curator)
indices? If so, how is this done? If not, what’s the alternative?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.