I had though that "parent" and "routing" were interchangeable and parent
was preferred when identifying child documents. However I've noticed that
the _mlt endpoint only seems to accept routing.
They are are actually two different things. parent is to identify parents
for parent-child relationships. routing is to tell ES to shortcut the
search/indexing only to a specific shard.
It's interesting that the second call works (it must have been implemented
for convenience) but in general if you're indexing or searching, I'd use
routing. If you are indexing a child document, then use parent to point to
its parent document.
Thanks for the reply. I still am not sure I understand the distinction
between routing and parent. This document is part of a parent->child
relationship and at index time I specify "parent" not "routing". It seems
odd that at retrieval time (and only for the mlt API) routing is required.
On Thursday, March 6, 2014 4:37:55 PM UTC-5, Binh Ly wrote:
They are are actually two different things. parent is to identify parents
for parent-child relationships. routing is to tell ES to shortcut the
search/indexing only to a specific shard.
It's interesting that the second call works (it must have been implemented
for convenience) but in general if you're indexing or searching, I'd use
routing. If you are indexing a child document, then use parent to point to
its parent document.
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.