Nested: NullPointerException during has parent query


(VB) #1

I am having weird issue

http://localhost:9200/1_exposureindex/riskitemsearch/_search/

{
"query": {
"has_parent": {
"parent_type": "contractsearch",
"query": {
"term": {
"Name": "4l4"
}
}
}
}
}

when I execute this query I get null pointer exception

{

  • error: SearchPhaseExecutionException[Failed to execute phase [query],
    total failure; shardFailures {[zohpYnUKQNSpROOg6eER9Q][1_exposureindex][1]:
    SearchParseException[[1_exposureindex][1]: from[-1],size[-1]: Parse Failure
    [Failed to parse source
    [{"query":{"has_parent":{"parent_type":"contractsearch","query":{"term":{"Name":"4l4"}}}}}]]];
    nested: NullPointerException;
    }{[zohpYnUKQNSpROOg6eER9Q][1_exposureindex][0]:
    SearchParseException[[1_exposureindex][0]: from[-1],size[-1]: Parse Failure
    [Failed to parse source
    [{"query":{"has_parent":{"parent_type":"contractsearch","query":{"term":{"Name":"4l4"}}}}}]]];
    nested: NullPointerException; }]
  • status: 500

}

but same query works when I do has_child

e.g.
http://localhost:9200/1_exposureindex/contractsearch/_search/

{
"query": {
"has_child": {
"type": "riskitemsearch",
"query": {
"term": {
"Name": "4l4"
}
}
}
}
}

Please help.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Luca Cavanna) #2

HI,
as mentioned in the same stackoverflow question you posted, it would be
useful to have a complete curl recreation that includes a few documents
that you indexed to reproduce the problem.
Can you send that please?

Cheers
Luca

On Wednesday, October 23, 2013 12:47:32 AM UTC+2, VB wrote:

I am having weird issue

http://localhost:9200/1_exposureindex/riskitemsearch/_search/

{
"query": {
"has_parent": {
"parent_type": "contractsearch",
"query": {
"term": {
"Name": "4l4"
}
}
}
}
}

when I execute this query I get null pointer exception

{

  • error: SearchPhaseExecutionException[Failed to execute phase
    [query], total failure; shardFailures
    {[zohpYnUKQNSpROOg6eER9Q][1_exposureindex][1]:
    SearchParseException[[1_exposureindex][1]: from[-1],size[-1]: Parse Failure
    [Failed to parse source
    [{"query":{"has_parent":{"parent_type":"contractsearch","query":{"term":{"Name":"4l4"}}}}}]]];
    nested: NullPointerException;
    }{[zohpYnUKQNSpROOg6eER9Q][1_exposureindex][0]:
    SearchParseException[[1_exposureindex][0]: from[-1],size[-1]: Parse Failure
    [Failed to parse source
    [{"query":{"has_parent":{"parent_type":"contractsearch","query":{"term":{"Name":"4l4"}}}}}]]];
    nested: NullPointerException; }]
  • status: 500

}

but same query works when I do has_child

e.g.
http://localhost:9200/1_exposureindex/contractsearch/_search/

{
"query": {
"has_child": {
"type": "riskitemsearch",
"query": {
"term": {
"Name": "4l4"
}
}
}
}
}

Please help.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3