Nullpointer on sort, version 0.90.3

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.

Sorry, messed up some of the fieldnames here since i copy/pasted from
different tests, but the field name "position_section_1954.orderby" is
present in the exception, and the mapping is also for
position_section_1954.orderby.

On Wed, Aug 21, 2013 at 3:33 PM, Runar Myklebust runar.a.m@gmail.comwrote:

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

--
mvh

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.

I think this is related
to NPE in BytesRefOrdValComparator · Issue #3470 · elastic/elasticsearch · GitHub
it should be fixed in the next release which is coming soon

simon

On Wednesday, August 21, 2013 3:40:46 PM UTC+2, Runar Myklebust wrote:

Sorry, messed up some of the fieldnames here since i copy/pasted from
different tests, but the field name "position_section_1954.orderby" is
present in the exception, and the mapping is also for
position_section_1954.orderby.

On Wed, Aug 21, 2013 at 3:33 PM, Runar Myklebust <runa...@gmail.com<javascript:>

wrote:

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

--
mvh

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.

Yes, thanks, it works as expected in 0.90.4-SNAPSHOT.

Any idea if soon means within a week or two or within a month or two?

On Wed, Aug 21, 2013 at 4:22 PM, simonw
simon.willnauer@elasticsearch.comwrote:

I think this is related to
NPE in BytesRefOrdValComparator · Issue #3470 · elastic/elasticsearch · GitHub
it should be fixed in the next release which is coming soon

simon

--
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.

our usual minor release cycle is 4 weeks so it should be relatively soon!
thanks so much for checking / confirming!

simon

On Thursday, August 22, 2013 9:59:27 AM UTC+2, Runar Myklebust wrote:

Yes, thanks, it works as expected in 0.90.4-SNAPSHOT.

Any idea if soon means within a week or two or within a month or two?

On Wed, Aug 21, 2013 at 4:22 PM, simonw <simon.w...@elasticsearch.com<javascript:>

wrote:

I think this is related to
NPE in BytesRefOrdValComparator · Issue #3470 · elastic/elasticsearch · GitHub
it should be fixed in the next release which is coming soon

simon

--
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.