Skip to content
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

NPE when using java client with DFS_QUERY_THEN_FETCH #3008

Closed
waterdh opened this Issue May 8, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@waterdh
Copy link

commented May 8, 2013

here's the request.toString() content, this request works fine with REST API, but not work with java client.
{
"from" : 0,
"size" : 5000,
"query" : {
"bool" : {
"must" : [ {
"match" : {
"tag" : {
"query" : "Custom",
"type" : "phrase"
}
}
}, {
"range" : {
"timestamp" : {
"from" : 1367251200000,
"to" : 1367942400000,
"include_lower" : true,
"include_upper" : true
}
}
} ]
}
},
"explain" : false,
"fields" : [ "tag", "buildId", "timestamp", "day", "count" ],
"sort" : [ {
"timestamp" : {
"order" : "desc"
}
} ]
}
below is the response:
{
"took" : 5,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 0,
"failed" : 5,
"failures" : [ {
"status" : 500,
"reason" : "SendRequestTransportException[[es-node-6][inet[/10.217.41.206:9300]][search/phase/query/id]]; nested: NullPointerException; "
}, {
"status" : 500,
"reason" : "SendRequestTransportException[[es-node-5][inet[/10.8.199.3:9300]][search/phase/query/id]]; nested: NullPointerException; "
}, {
"status" : 500,
"reason" : "SendRequestTransportException[[es-node-5][inet[/10.8.199.3:9300]][search/phase/query/id]]; nested: NullPointerException; "
}, {
"status" : 500,
"reason" : "SendRequestTransportException[[es-node-7][inet[/10.143.135.88:9300]][search/phase/query/id]]; nested: NullPointerException; "
}, {
"status" : 500,
"reason" : "SendRequestTransportException[[es-node-7][inet[/10.143.135.88:9300]][search/phase/query/id]]; nested: NullPointerException; "
} ]
},
"hits" : {
"total" : 0,
"max_score" : 0.0,
"hits" : [ ]
}
}

@waterdh

This comment has been minimized.

Copy link
Author

commented May 8, 2013

actually, it's using DFS_QUERY_THEN_FETCH, builder.setSearchType(SearchType.DFS_QUERY_THEN_FETCH);
when changed to SearchType.QUERY_THEN_FETCH, it works fine.

@s1monw

This comment has been minimized.

Copy link
Contributor

commented May 8, 2013

hey, I am curious do you see more infos about this in the logs? ie. the root cause of the exception?
I am also curious about your setup ie. if you upgraded from 0.20 to 0.90 and the index was essentially created with a previous version of elasticsearch?

@s1monw

This comment has been minimized.

Copy link
Contributor

commented May 8, 2013

it seems #3012 is the reason for this...

@s1monw

This comment has been minimized.

Copy link
Contributor

commented May 14, 2013

fixed by #3012

@s1monw s1monw closed this May 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.