You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I met a strange problem with the latest version of Elasticsearch (1.3.2) - strage as always when NPE occurs :-)
Noticed that Elasticsearch 0.90 did not have such an issue.
Having single incorrect type which references to inexisting parent results in NPE while executing hasParent query/filter on another - correct - type.
To reproduce the issue please refer to description below.
Above query is gonna fail with NullPointerException without possiblity to catch a real problem (debug helps here :)),
org.elasticsearch.search.SearchParseException: [test][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{
"filter": {
"has_parent": {
"type": "parents",
"query": {
"query_string": {
"query": "*"
}
}
}
}
}
]]
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:664)
at org.elasticsearch.search.SearchService.createContext(SearchService.java:515)
at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:487)
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:256)
at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:206)
at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:203)
at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:517)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
at org.elasticsearch.index.query.HasParentFilterParser.parse(HasParentFilterParser.java:158)
at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:290)
at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:271)
at org.elasticsearch.index.query.IndexQueryParserService.parseInnerFilter(IndexQueryParserService.java:282)
at org.elasticsearch.search.query.PostFilterParseElement.parse(PostFilterParseElement.java:33)
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:648)
... 9 more
Btw. Query on incorrect type (children2) fails fine since it throws:
[test] [has_parent] filter configured 'parent_type' [parents2] is not a valid type];
The text was updated successfully, but these errors were encountered:
Hi,
I met a strange problem with the latest version of Elasticsearch (1.3.2) - strage as always when NPE occurs :-)
Noticed that Elasticsearch 0.90 did not have such an issue.
Having single incorrect type which references to inexisting parent results in NPE while executing hasParent query/filter on another - correct - type.
To reproduce the issue please refer to description below.
Create index:
Correct mapping:
Mapping for type with missing parent type:
Add something to parents (corrent one) to create mapping:
Above query is gonna fail with NullPointerException without possiblity to catch a real problem (debug helps here :)),
Btw. Query on incorrect type (children2) fails fine since it throws:
The text was updated successfully, but these errors were encountered: