Duplicating post from nabble, as it didn't dupicate it here.
I have 1 index object with 2 types: entity and shop</
i>. Object shop is child of object entity and has following mapping.
Sending this query to
object/_search returns me the child doc only, which is ok, as I can
manually join it.
But, when I add term for parent doc, I receive parent doc only as a
search hit. Query example</
a>.
Since according to the docs there is no way to perform parent and
child join, can I at least fetch child docs with search conditions
specified for both parent and child?
Duplicating post from nabble, as it didn't dupicate it here.
I have 1 index object with 2 types: entity and shop</
i>. Object shop is child of object entity and has following mapping.
Sending this query to
object/_search returns me the child doc only, which is ok, as I can
manually join it.
But, when I add term for parent doc, I receive parent doc only as a
search hit. Query example</
a>.
Duplicating post from nabble, as it didn't dupicate it here.
I have 1 index object with 2 types: entity and shop</
i>. Object shop is child of object entity and has following mapping.
Sending this query to
object/_search returns me the child doc only, which is ok, as I can
manually join it.
But, when I add term for parent doc, I receive parent doc only as a
search hit. Query example</
a>.
You can search child docs since they are just docs, and then retried them.
But that means you can only search on data associated with the child docs.
If you also want to search on parent data, then you will only get back
parent docs. You can go and get child docs associated with parent docs, that
that won't "filter" out possibly matching child docs.
Duplicating post from nabble, as it didn't dupicate it here.
I have 1 index object with 2 types: entity and shop</
i>. Object shop is child of object entity and has following mapping.
Sending this query to
object/_search returns me the child doc only, which is ok, as I can
manually join it.
But, when I add term for parent doc, I receive parent doc only as a
search hit. Query example</
a>.
So it can be done in 2 queries:
1st one - both on parent and child, retrieving parent only
2nd one - in order to retrieve childs, associated with parent. What query to
use? Filter terms on _parent field, listing all found ids?
You can search child docs since they are just docs, and then retried them.
But that means you can only search on data associated with the child docs.
If you also want to search on parent data, then you will only get back
parent docs. You can go and get child docs associated with parent docs, that
that won't "filter" out possibly matching child docs.
Duplicating post from nabble, as it didn't dupicate it here.
I have 1 index object with 2 types: entity and shop</
i>. Object shop is child of object entity and has following mapping.
Sending this query to
object/_search returns me the child doc only, which is ok, as I can
manually join it.
But, when I add term for parent doc, I receive parent doc only as a
search hit. Query example</
a>.
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.