Im doing a test-upgrade on our product, embedding ES version 0.20.6 to
0.90.3
Suddenly, a lot of queries fails with NPE. Ive isolated the problem to
happen on sorting on some (most) values:
Here is query i test on:
{
"size": 0,
"query": {
"match_all": {}
},
"sort" : {
"position_section_1954.orderby" : {
"ignore_unmapped" : true
}
}
}
which fails with exception:
{
"error": "SearchPhaseExecutionException[Failed to execute phase
[query], all shards failed; shardFailures
{[ViFbnvtyQpG3oc04Mke8wA][cms][0]: QueryPhaseExecutionException[[cms][0]:
query[ConstantScore(:)],from[0],size[0],sort[<custom:"position_section_1954":
org.elasticsearch.index.fielddata.fieldcomparator.BytesRefFieldComparatorSource@3a8f69ac>]:
Query Failed [Failed to execute main query]]; nested: NullPointerException;
}{[ViFbnvtyQpG3oc04Mke8wA][cms][2]: QueryPhaseExecutionException[[cms][2]:
query[ConstantScore(:)],from[0],size[0],sort[<custom:"position_section_1954":
org.elasticsearch.index.fielddata.fieldcomparator.BytesRefFieldComparatorSource@3a8f69ac>]:
Query Failed [Failed to execute main query]]; nested: NullPointerException;
}{[ViFbnvtyQpG3oc04Mke8wA][cms][1]: QueryPhaseExecutionException[[cms][1]:
query[ConstantScore(:)],from[0],size[0],sort[<custom:"position_section_1954":
org.elasticsearch.index.fielddata.fieldcomparator.BytesRefFieldComparatorSource@3a8f69ac>]:
Query Failed [Failed to execute main query]]; nested: NullPointerException;
}{[ViFbnvtyQpG3oc04Mke8wA][cms][3]: QueryPhaseExecutionException[[cms][3]:
query[ConstantScore(:)],from[0],size[0],sort[<custom:"position_section_1954":
org.elasticsearch.index.fielddata.fieldcomparator.BytesRefFieldComparatorSource@19fb31ff>]:
Query Failed [Failed to execute main query]]; nested: NullPointerException;
}]",
"status": 500
}
The mapping for this field is:
position_section_1845.orderby": {
"type": "string",
"index": "not_analyzed",
"omit_norms": true,
"index_options": "docs"
}
I see when debug that this happens because this line: Object ordsStorage =
docToOrd.ordinals().getBackingStorage() in BytesRefOrdValComparator uses
the MultiOrdinals-implementation where docToOrd.ordinals() always is null?
Some other field works all right when soring on them (with same mapping)
but most now fails with same exception.
Is this i a bug or do I have to seek the answer somewhere in our
implementation of e.g storing data? We had no trouble with this using 0.20.6
greetings
Runar Myklebust
--
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.