ArrayIndexOutOfBoundException: -1 with nested facets


(Wojciech Durczyński) #1

Hello Shay

I noticed a problem with faceting on nested documents.
If I index some documents with fields of nested type and then do some
faceting on nested objects - it works.
But if I reindex my documents (they have changed, so are indexed again to
the same index and with the same ids), then query with facets causes:

Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException:
[om_b3585e93-374b-432a-aa63-9d75b2c2b725][0]:
query[ConstantScore(org.elasticsearch.common.lucene.search.AndFilter@c002669b)],from[0],size[0]:
Query Failed [Failed to execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:501)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:492)
at
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:238)
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.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:391)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:298)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:286)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:217)
... 7 more

The problem exists in ES 0.17.8.


(Shay Banon) #2

Heya,

Another user reported something similar, and still have not managed to
chase this down. It would really help if you can create a recreation of it,
including indexing the data. Is it possible?

2011/11/10 Wojciech Durczyński wojciech.durczynski@comarch.com

Hello Shay

I noticed a problem with faceting on nested documents.
If I index some documents with fields of nested type and then do some
faceting on nested objects - it works.
But if I reindex my documents (they have changed, so are indexed again to
the same index and with the same ids), then query with facets causes:

Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException:
[om_b3585e93-374b-432a-aa63-9d75b2c2b725][0]:
query[ConstantScore(org.elasticsearch.common.lucene.search.AndFilter@c002669b)],from[0],size[0]:
Query Failed [Failed to execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:501)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:492)
at
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:238)
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.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:391)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:298)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:286)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:217)
... 7 more

The problem exists in ES 0.17.8.


(Rubish Gupta) #3

I am also facing a similar problem, but I am not sure if its related to
reindexing of docs. It results in the exception even if I delete the index
and index docs for the first time. I will try to come with a simple
re-creation.

[2011-11-14 12:38:59,524][DEBUG][action.search.type ] [Baron Macabre]
[development_users][0], node[oF0hOAX7T6Sx3doYuOHxsA], [P], s[STARTED]:
Failed to execute [org.elasticsearch.action.search.SearchRequest@70eaa683]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[development_users][0]:
query[ConstantScore(:)],from[0],size[0],sort[<custom:"profile_completeness":
org.elasticsearch.index.field.data.doubles.DoubleFieldDataType$1@4783165b>!,<custom:"created_at":
org.elasticsearch.index.field.data.longs.LongFieldDataType$1@6f30d50a>]:
Query Failed [Failed to execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:224)
at
org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:71)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:205)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:192)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:178)
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:662)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:153)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:215)
... 9 more

I am on elasticsearch/0.17.9

On Sun, Nov 13, 2011 at 12:37 PM, Shay Banon kimchy@gmail.com wrote:

Heya,

Another user reported something similar, and still have not managed to
chase this down. It would really help if you can create a recreation of it,
including indexing the data. Is it possible?

2011/11/10 Wojciech Durczyński wojciech.durczynski@comarch.com

Hello Shay

I noticed a problem with faceting on nested documents.
If I index some documents with fields of nested type and then do some
faceting on nested objects - it works.
But if I reindex my documents (they have changed, so are indexed again to
the same index and with the same ids), then query with facets causes:

Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException:
[om_b3585e93-374b-432a-aa63-9d75b2c2b725][0]:
query[ConstantScore(org.elasticsearch.common.lucene.search.AndFilter@c002669b)],from[0],size[0]:
Query Failed [Failed to execute main query]
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:501)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:492)
at
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:238)
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.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:391)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:298)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:286)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:217)
... 7 more

The problem exists in ES 0.17.8.


(Rubish Gupta) #4

Here(https://gist.github.com/1363521) are the curl commands to recreate the
issue on ES 0.17.9. It is not minimalistic, but just a recreation.

On Mon, Nov 14, 2011 at 12:44 PM, rubish gupta <rubish.gupta@almaconnect.com

wrote:

I am also facing a similar problem, but I am not sure if its related to
reindexing of docs. It results in the exception even if I delete the index
and index docs for the first time. I will try to come with a simple
re-creation.

[2011-11-14 12:38:59,524][DEBUG][action.search.type ] [Baron
Macabre] [development_users][0], node[oF0hOAX7T6Sx3doYuOHxsA], [P],
s[STARTED]: Failed to execute
[org.elasticsearch.action.search.SearchRequest@70eaa683]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[development_users][0]:
query[ConstantScore(:)],from[0],size[0],sort[<custom:"profile_completeness":
org.elasticsearch.index.field.data.doubles.DoubleFieldDataType$1@4783165b>!,<custom:"created_at":
org.elasticsearch.index.field.data.longs.LongFieldDataType$1@6f30d50a>]:
Query Failed [Failed to execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:224)
at
org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:71)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:205)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:192)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:178)
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:662)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:153)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:215)
... 9 more

I am on elasticsearch/0.17.9

On Sun, Nov 13, 2011 at 12:37 PM, Shay Banon kimchy@gmail.com wrote:

Heya,

Another user reported something similar, and still have not managed to
chase this down. It would really help if you can create a recreation of it,
including indexing the data. Is it possible?

2011/11/10 Wojciech Durczyński wojciech.durczynski@comarch.com

Hello Shay

I noticed a problem with faceting on nested documents.
If I index some documents with fields of nested type and then do some
faceting on nested objects - it works.
But if I reindex my documents (they have changed, so are indexed again
to the same index and with the same ids), then query with facets causes:

Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException:
[om_b3585e93-374b-432a-aa63-9d75b2c2b725][0]:
query[ConstantScore(org.elasticsearch.common.lucene.search.AndFilter@c002669b)],from[0],size[0]:
Query Failed [Failed to execute main query]
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:501)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:492)
at
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:238)
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.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:391)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:298)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:286)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:217)
... 7 more

The problem exists in ES 0.17.8.


(Shay Banon) #5

Heya,

Thanks for the recreation!, fixed:
https://github.com/elasticsearch/elasticsearch/issues/1467.

-shay.banon

On Mon, Nov 14, 2011 at 9:14 AM, rubish gupta
rubish.gupta@almaconnect.comwrote:

I am also facing a similar problem, but I am not sure if its related to
reindexing of docs. It results in the exception even if I delete the index
and index docs for the first time. I will try to come with a simple
re-creation.

[2011-11-14 12:38:59,524][DEBUG][action.search.type ] [Baron
Macabre] [development_users][0], node[oF0hOAX7T6Sx3doYuOHxsA], [P],
s[STARTED]: Failed to execute
[org.elasticsearch.action.search.SearchRequest@70eaa683]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[development_users][0]:
query[ConstantScore(:)],from[0],size[0],sort[<custom:"profile_completeness":
org.elasticsearch.index.field.data.doubles.DoubleFieldDataType$1@4783165b>!,<custom:"created_at":
org.elasticsearch.index.field.data.longs.LongFieldDataType$1@6f30d50a>]:
Query Failed [Failed to execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:224)
at
org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:71)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:205)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:192)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:178)
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:662)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:153)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:215)
... 9 more

I am on elasticsearch/0.17.9

On Sun, Nov 13, 2011 at 12:37 PM, Shay Banon kimchy@gmail.com wrote:

Heya,

Another user reported something similar, and still have not managed to
chase this down. It would really help if you can create a recreation of it,
including indexing the data. Is it possible?

2011/11/10 Wojciech Durczyński wojciech.durczynski@comarch.com

Hello Shay

I noticed a problem with faceting on nested documents.
If I index some documents with fields of nested type and then do some
faceting on nested objects - it works.
But if I reindex my documents (they have changed, so are indexed again
to the same index and with the same ids), then query with facets causes:

Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException:
[om_b3585e93-374b-432a-aa63-9d75b2c2b725][0]:
query[ConstantScore(org.elasticsearch.common.lucene.search.AndFilter@c002669b)],from[0],size[0]:
Query Failed [Failed to execute main query]
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:501)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:492)
at
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:238)
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.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:391)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:298)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:286)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:217)
... 7 more

The problem exists in ES 0.17.8.


(Rubish Gupta) #6

Thanks for the quick fix. Will this be included in 0.18.3?

2011/11/15 Shay Banon kimchy@gmail.com

Heya,

Thanks for the recreation!, fixed:
https://github.com/elasticsearch/elasticsearch/issues/1467.

-shay.banon

On Mon, Nov 14, 2011 at 9:14 AM, rubish gupta <
rubish.gupta@almaconnect.com> wrote:

I am also facing a similar problem, but I am not sure if its related to
reindexing of docs. It results in the exception even if I delete the index
and index docs for the first time. I will try to come with a simple
re-creation.

[2011-11-14 12:38:59,524][DEBUG][action.search.type ] [Baron
Macabre] [development_users][0], node[oF0hOAX7T6Sx3doYuOHxsA], [P],
s[STARTED]: Failed to execute
[org.elasticsearch.action.search.SearchRequest@70eaa683]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[development_users][0]:
query[ConstantScore(:)],from[0],size[0],sort[<custom:"profile_completeness":
org.elasticsearch.index.field.data.doubles.DoubleFieldDataType$1@4783165b>!,<custom:"created_at":
org.elasticsearch.index.field.data.longs.LongFieldDataType$1@6f30d50a>]:
Query Failed [Failed to execute main query]
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:224)
at
org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:71)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:205)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:192)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:178)
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:662)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:153)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:215)
... 9 more

I am on elasticsearch/0.17.9

On Sun, Nov 13, 2011 at 12:37 PM, Shay Banon kimchy@gmail.com wrote:

Heya,

Another user reported something similar, and still have not managed to
chase this down. It would really help if you can create a recreation of it,
including indexing the data. Is it possible?

2011/11/10 Wojciech Durczyński wojciech.durczynski@comarch.com

Hello Shay

I noticed a problem with faceting on nested documents.
If I index some documents with fields of nested type and then do some
faceting on nested objects - it works.
But if I reindex my documents (they have changed, so are indexed again
to the same index and with the same ids), then query with facets causes:

Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException:
[om_b3585e93-374b-432a-aa63-9d75b2c2b725][0]:
query[ConstantScore(org.elasticsearch.common.lucene.search.AndFilter@c002669b)],from[0],size[0]:
Query Failed [Failed to execute main query]
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:501)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:492)
at
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:238)
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.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:391)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:298)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:286)
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:217)
... 7 more

The problem exists in ES 0.17.8.


(Shay Banon) #7

Yes, each issue inclues tag that shows which version they will be in.

On Tue, Nov 15, 2011 at 10:21 AM, rubish gupta <rubish.gupta@almaconnect.com

wrote:

Thanks for the quick fix. Will this be included in 0.18.3?

2011/11/15 Shay Banon kimchy@gmail.com

Heya,

Thanks for the recreation!, fixed:
https://github.com/elasticsearch/elasticsearch/issues/1467.

-shay.banon

On Mon, Nov 14, 2011 at 9:14 AM, rubish gupta <
rubish.gupta@almaconnect.com> wrote:

I am also facing a similar problem, but I am not sure if its related to
reindexing of docs. It results in the exception even if I delete the index
and index docs for the first time. I will try to come with a simple
re-creation.

[2011-11-14 12:38:59,524][DEBUG][action.search.type ] [Baron
Macabre] [development_users][0], node[oF0hOAX7T6Sx3doYuOHxsA], [P],
s[STARTED]: Failed to execute
[org.elasticsearch.action.search.SearchRequest@70eaa683]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[development_users][0]:
query[ConstantScore(:)],from[0],size[0],sort[<custom:"profile_completeness":
org.elasticsearch.index.field.data.doubles.DoubleFieldDataType$1@4783165b>!,<custom:"created_at":
org.elasticsearch.index.field.data.longs.LongFieldDataType$1@6f30d50a>]:
Query Failed [Failed to execute main query]
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:224)
at
org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:71)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:205)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:192)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:178)
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:662)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:153)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:215)
... 9 more

I am on elasticsearch/0.17.9

On Sun, Nov 13, 2011 at 12:37 PM, Shay Banon kimchy@gmail.com wrote:

Heya,

Another user reported something similar, and still have not managed
to chase this down. It would really help if you can create a recreation of
it, including indexing the data. Is it possible?

2011/11/10 Wojciech Durczyński wojciech.durczynski@comarch.com

Hello Shay

I noticed a problem with faceting on nested documents.
If I index some documents with fields of nested type and then do some
faceting on nested objects - it works.
But if I reindex my documents (they have changed, so are indexed again
to the same index and with the same ids), then query with facets causes:

Caused by:
org.elasticsearch.search.query.QueryPhaseExecutionException:
[om_b3585e93-374b-432a-aa63-9d75b2c2b725][0]:
query[ConstantScore(org.elasticsearch.common.lucene.search.AndFilter@c002669b)],from[0],size[0]:
Query Failed [Failed to execute main query]
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:501)
at
org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:492)
at
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:238)
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.ArrayIndexOutOfBoundsException: -1
at org.apache.lucene.util.FixedBitSet.prevSetBit(FixedBitSet.java:166)
at
org.elasticsearch.index.search.nested.NestedChildrenCollector.collect(NestedChildrenCollector.java:82)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:57)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:198)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:391)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:298)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:286)
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:217)
... 7 more

The problem exists in ES 0.17.8.


(system) #8