New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HasChild query picks wrong type #5783
Comments
Also see #5399 |
I'm not entirely sure if these are related issues. The curiosity here is the position of |
I think it's simply ignored and then you don't have a type restriction seems like a bug |
@MrHash this is a bug with the way that |
Fixes #5783 Fixes #5838 Conflicts: src/main/java/org/elasticsearch/index/query/HasChildFilterParser.java src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java src/main/java/org/elasticsearch/index/query/HasParentFilterParser.java src/main/java/org/elasticsearch/index/query/HasParentQueryParser.java src/main/java/org/elasticsearch/index/query/TopChildrenQueryParser.java
when i use has_child to index and search ,i get no result return ,why?i have use losts of es version.please help me. |
@fanbiao Please ask these questions on the mailing list |
we could not retrieve the child document _source when i use parent-child query,how can i do that? |
Fixes elastic#5783 Fixes elastic#5838 Conflicts: src/main/java/org/elasticsearch/index/query/HasChildFilterParser.java src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java src/main/java/org/elasticsearch/index/query/HasParentFilterParser.java src/main/java/org/elasticsearch/index/query/HasParentQueryParser.java src/main/java/org/elasticsearch/index/query/TopChildrenQueryParser.java
Given the following setup:
This query runs correctly:
Whereas this query with the parent type specifed after the query, fails:
Somehow the second example is picking the
specials
typetitle
field instead of the type specified in thehas_child
block. I have tested this on ES 1.0.2 and took me a while to figure out what was going on...The text was updated successfully, but these errors were encountered: