I'm trying to build an index schema with three levels, lets call them a, b
and c, which are joined via parent-child-relations. The 'a' type is parent
of the 'b' type, which again is parent of the 'c' type. Querying the top
level, the 'a' type, via its 'b' children works without issues. However,
when I try to query the middle 'b' level via its 'c' children, i.e. query
/myindex/b/ with a has_child() query for type 'c' with some query that
matches one of the 'c' documents in my index, I always get zero results. I
tested this against 0.19.1 and the latest version from git, both via the
Java API and via curl'ed json requests. I'm attaching a shell script with
my curl requests, I hope I didnt overlook any errors in there, but I
quadruple checked it and couldn't find any.
When you index mult level mappings, for the third level you need to make
sure to set teh routing value to the top most doc id, otherwise, it will be
routed wrongly. For example, index c with routing of a1. See if it helps...
I'm trying to build an index schema with three levels, lets call them a, b
and c, which are joined via parent-child-relations. The 'a' type is parent
of the 'b' type, which again is parent of the 'c' type. Querying the top
level, the 'a' type, via its 'b' children works without issues. However,
when I try to query the middle 'b' level via its 'c' children, i.e. query
/myindex/b/ with a has_child() query for type 'c' with some query that
matches one of the 'c' documents in my index, I always get zero results. I
tested this against 0.19.1 and the latest version from git, both via the
Java API and via curl'ed json requests. I'm attaching a shell script with
my curl requests, I hope I didnt overlook any errors in there, but I
quadruple checked it and couldn't find any.
Am Dienstag, 3. April 2012 15:41:04 UTC+2 schrieb kimchy:
When you index mult level mappings, for the third level you need to make
sure to set teh routing value to the top most doc id, otherwise, it will be
routed wrongly. For example, index c with routing of a1. See if it helps...
I'm trying to build an index schema with three levels, lets call them a,
b and c, which are joined via parent-child-relations. The 'a' type is
parent of the 'b' type, which again is parent of the 'c' type. Querying the
top level, the 'a' type, via its 'b' children works without issues.
However, when I try to query the middle 'b' level via its 'c' children,
i.e. query /myindex/b/ with a has_child() query for type 'c' with some
query that matches one of the 'c' documents in my index, I always get zero
results. I tested this against 0.19.1 and the latest version from git, both
via the Java API and via curl'ed json requests. I'm attaching a shell
script with my curl requests, I hope I didnt overlook any errors in there,
but I quadruple checked it and couldn't find any.
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.