From the elasticsearch.log:
[2010-12-28 16:54:02,338][DEBUG][action.search.type ] [Llan the
Sorcerer] [node226233][0], node[ev3EtX0OQd2vJFNtTj-_Rw], [P],
s[STARTED]: Failed to execute
[org.elasticsearch.action.search.SearchRequest@a4cc1d]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[node226233][0]:
query[ConstantScore(org.elasticsearch.common.lucene.search.AndFilter@47a2308f
^1.2],from[0],size[50],sort[<custom:"extrasorts.sort_name":
org.elasticsearch.index.field.data.strings.StringFieldDataType
$1@26d5587e>]: Query Failed [Failed to execute main query]
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:114)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:
173)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:
131)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction
$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:
76)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction
$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction
$BaseAsyncAction.access$000(TransportSearchTypeAction.java:77)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction
$BaseAsyncAction$1.run(TransportSearchTypeAction.java:150)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
Even if I take out the 'sort' part:
[2010-12-28 17:01:01,321][DEBUG][action.search.type ] [Llan the
Sorcerer] [node226233][0], node[ev3EtX0OQd2vJFNtTj-_Rw], [P],
s[STARTED]: Failed to execute
[org.elasticsearch.action.search.SearchRequest@49033a5]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[node226233][0]:
query[ConstantScore(org.elasticsearch.common.lucene.search.AndFilter@efdb83f7
^1.2],from[0],size[50]:
Query Failed [Failed to execute main query]
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:114)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:
173)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:
131)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction
$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:
76)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction
$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction
$BaseAsyncAction.access$000(TransportSearchTypeAction.java:77)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction
$BaseAsyncAction$1.run(TransportSearchTypeAction.java:150)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
On Dec 28, 4:40 pm, Evan Stenmark stenm...@gmail.com wrote:
Upon further inspection, that's not the root issue.
The full search looks like this (I've renamed fields/data):
{
"from":0,
"size":"50",
"sort":{"extrasorts.sort_name":"asc"},
"fields":["_id"],
"query":{
"constant_score":{
"filter":{
"and":[
{
"term":{
"node":1
}
},
{
"term":{
"is_searchable":1
}
},
{
"range":{
"somedata.5555.someDateField":{
"from":"2010-12-28T16:12:11-06:00"
}
}
},
{
"term":{
"somedata.1111.somefield":1
}
},
{
"query":{
"query_string":{
"fields":[
"somedata.1234.field1",
"somedata.1234.field2"
],
"query":"myquery"
}
}
},
{
"terms":{
"tier":[
"1",
"2"
]
}
}
]
},
"boost":1.2
}
}
}
I tried pulling out all of the filters inside of the 'and' except for
the query_string portion and the search worked. So I'm not sure where
the error is. I'm still trying to track it down. But let me know if
you see anything sticking out.
On Dec 28, 4:34 pm, Evan Stenmark stenm...@gmail.com wrote:
I recently upgraded to .13 and now I think I'm seeing an issue with
query_string with multiple fields.
If I use this query like:
{
"query":{
"query_string":{
"fields":[
"somedata.1234.field1"
],
"query":"myquery"
}
}
}
I get results and no error, but this query:
{
"query":{
"query_string":{
"fields":[
"somedata.1234.field1",
"somedata.1234.field2"
],
"query":"myquery"
}
}
}
gives me this error (sorry it comes back to me without much
formatting):
SearchPhaseExecutionException[Failed to execute phase [query], total
failure; shardFailures {[ev3EtX0OQd2vJFNtTj-_Rw][nodedata][0]:
QueryPhaseExecutionException[[nodedata][0]:
query[ConstantScore(org.elasticsearch.common.lucene.search.AndFilter@744f214e
^1.2],from[0],size[50],sort[<custom:"extrasorts.sort_name":
org.elasticsearch.index.field.data.strings.StringFieldDataType
$1@58e090c8>]: Query Failed [Failed to execute main query]];
nested: }
...[cutting out several more lines of essentially repeated data in the
error]...
Was there something changed in query_string that I'm missing?