You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Faisal Mansoor <fa...@gmail.com> on 2014/10/14 00:51:14 UTC

ArrayIndexOutOfBoundsException in ToParentBlockJoinQuery

Hi,

I am having problems running Parent Block Join Query in Solr. For some
reasons the following query throws ArrayIndexOutOfBoundsException.

{!type=parent which='type_s:(shirt) AND BRAND_s:(Puma)'}
(type_s:(sku) AND SIZE_s:(XL))


The index I am using is not that big, only has a few hundred entries. But
it is frequently updated. Any clues what can cause this problem?

Thanks.
Faisal

Here is the complete stack trace for the exception:


    "trace": "java.lang.ArrayIndexOutOfBoundsException: -1\n\tat
org.apache.lucene.codecs.lucene40.BitVector.get(BitVector.java:149)\n\tat
org.apache.lucene.search.join.ToParentBlockJoinQuery$BlockJoinScorer.nextDoc(ToParentBlockJoinQuery.java:293)\n\tat
org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:192)\n\tat
org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)\n\tat
org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)\n\tat
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)\n\tat
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)\n\tat
org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:209)\n\tat
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1619)\n\tat
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1433)\n\tat
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:514)\n\tat
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:485)\n\tat
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)\n\tat
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat
org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:368)\n\tat
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)\n\tat
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\n\tat
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)\n\tat
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)\n\tat
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)\n\tat
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)\n\tat
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\n\tat
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)\n\tat
java.lang.Thread.run(Thread.java:745)\n",

Re: ArrayIndexOutOfBoundsException in ToParentBlockJoinQuery

Posted by Erick Erickson <er...@gmail.com>.
There's the CheckIndex tool, but I don't know whether it checks this case.

Is there any way you could check this against 4.10.1? I know there
were a couple of edge cases that were fixed in that release, but have
no idea whether block joins were affected.

But other than that, I'm clueless.

Erick

On Mon, Oct 13, 2014 at 9:33 PM, Faisal Mansoor
<fa...@gmail.com> wrote:
> Thanks Erick,
>
> I am using the 4.10.0 solr. To update any field, I first delete all
> existing documents matching _root_:id before inserting the updated version.
> So, I don't think that's causing the problem.
> Is there a way to validate the sanity of the index, are there any tools
> which can analyze the index and list problems or inconsistencies in the
> index?
>
> Thanks,
> Faisal
>
> On Mon, Oct 13, 2014 at 6:55 PM, Erick Erickson <er...@gmail.com>
> wrote:
>
>> What version of Solr? For Block Join you need to index all the docs
>> (parent/child) docs at once, and when they're updated they _all_ need
>> to be updated AFAIK.
>>
>> Best,
>> Erick
>>
>> On Mon, Oct 13, 2014 at 3:51 PM, Faisal Mansoor
>> <fa...@gmail.com> wrote:
>> > Hi,
>> >
>> > I am having problems running Parent Block Join Query in Solr. For some
>> > reasons the following query throws ArrayIndexOutOfBoundsException.
>> >
>> > {!type=parent which='type_s:(shirt) AND BRAND_s:(Puma)'}
>> > (type_s:(sku) AND SIZE_s:(XL))
>> >
>> >
>> > The index I am using is not that big, only has a few hundred entries. But
>> > it is frequently updated. Any clues what can cause this problem?
>> >
>> > Thanks.
>> > Faisal
>> >
>> > Here is the complete stack trace for the exception:
>> >
>> >
>> >     "trace": "java.lang.ArrayIndexOutOfBoundsException: -1\n\tat
>> > org.apache.lucene.codecs.lucene40.BitVector.get(BitVector.java:149)\n\tat
>> >
>> org.apache.lucene.search.join.ToParentBlockJoinQuery$BlockJoinScorer.nextDoc(ToParentBlockJoinQuery.java:293)\n\tat
>> >
>> org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:192)\n\tat
>> >
>> org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)\n\tat
>> > org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)\n\tat
>> >
>> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)\n\tat
>> >
>> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)\n\tat
>> >
>> org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:209)\n\tat
>> >
>> org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1619)\n\tat
>> >
>> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1433)\n\tat
>> >
>> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:514)\n\tat
>> >
>> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:485)\n\tat
>> >
>> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)\n\tat
>> >
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat
>> > org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)\n\tat
>> >
>> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)\n\tat
>> >
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)\n\tat
>> >
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)\n\tat
>> >
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat
>> >
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat
>> >
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\n\tat
>> >
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat
>> >
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat
>> >
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat
>> >
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat
>> >
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat
>> >
>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat
>> >
>> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat
>> >
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat
>> > org.eclipse.jetty.server.Server.handle(Server.java:368)\n\tat
>> >
>> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)\n\tat
>> >
>> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\n\tat
>> >
>> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)\n\tat
>> >
>> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)\n\tat
>> > org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)\n\tat
>> >
>> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)\n\tat
>> >
>> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\n\tat
>> >
>> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)\n\tat
>> >
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\n\tat
>> >
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)\n\tat
>> > java.lang.Thread.run(Thread.java:745)\n",
>>

Re: ArrayIndexOutOfBoundsException in ToParentBlockJoinQuery

Posted by Faisal Mansoor <fa...@gmail.com>.
Thanks a lot Mikhail, moving parent filters to fq solved the problem.
Thanks for the wt=csv technique that also was very helpful.

Thanks.
Faisal

On Mon, Oct 13, 2014 at 11:08 PM, Mikhail Khludnev <
mkhludnev@griddynamics.com> wrote:

> Hello Fasial,
>
> It's convenient to use wt=csv to verify block layout (make sue that rows=
> is high enough). Note, every span of children should be followed by parent.
> see
>
> http://blog.griddynamics.com/2013/12/grandchildren-and-siblings-with-block.html
> Putting BRAND_s: clause into the {! which= } is absolutely wrong. That
> param should contain only parent docs filter which differentiate them from
> parents. Any parent level filters should be passed at the top level of
> query or like fq=.
>
>
> On Tue, Oct 14, 2014 at 8:33 AM, Faisal Mansoor <fa...@gmail.com>
> wrote:
>
> > Thanks Erick,
> >
> > I am using the 4.10.0 solr. To update any field, I first delete all
> > existing documents matching _root_:id before inserting the updated
> version.
> > So, I don't think that's causing the problem.
> > Is there a way to validate the sanity of the index, are there any tools
> > which can analyze the index and list problems or inconsistencies in the
> > index?
> >
> > Thanks,
> > Faisal
> >
> > On Mon, Oct 13, 2014 at 6:55 PM, Erick Erickson <erickerickson@gmail.com
> >
> > wrote:
> >
> > > What version of Solr? For Block Join you need to index all the docs
> > > (parent/child) docs at once, and when they're updated they _all_ need
> > > to be updated AFAIK.
> > >
> > > Best,
> > > Erick
> > >
> > > On Mon, Oct 13, 2014 at 3:51 PM, Faisal Mansoor
> > > <fa...@gmail.com> wrote:
> > > > Hi,
> > > >
> > > > I am having problems running Parent Block Join Query in Solr. For
> some
> > > > reasons the following query throws ArrayIndexOutOfBoundsException.
> > > >
> > > > {!type=parent which='type_s:(shirt) AND BRAND_s:(Puma)'}
> > > > (type_s:(sku) AND SIZE_s:(XL))
> > > >
> > > >
> > > > The index I am using is not that big, only has a few hundred entries.
> > But
> > > > it is frequently updated. Any clues what can cause this problem?
> > > >
> > > > Thanks.
> > > > Faisal
> > > >
> > > > Here is the complete stack trace for the exception:
> > > >
> > > >
> > > >     "trace": "java.lang.ArrayIndexOutOfBoundsException: -1\n\tat
> > > >
> > org.apache.lucene.codecs.lucene40.BitVector.get(BitVector.java:149)\n\tat
> > > >
> > >
> >
> org.apache.lucene.search.join.ToParentBlockJoinQuery$BlockJoinScorer.nextDoc(ToParentBlockJoinQuery.java:293)\n\tat
> > > >
> > >
> >
> org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:192)\n\tat
> > > >
> > >
> >
> org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)\n\tat
> > > > org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)\n\tat
> > > >
> > >
> >
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)\n\tat
> > > >
> > >
> >
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)\n\tat
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:209)\n\tat
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1619)\n\tat
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1433)\n\tat
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:514)\n\tat
> > > >
> > >
> >
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:485)\n\tat
> > > >
> > >
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)\n\tat
> > > >
> > >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat
> > > > org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)\n\tat
> > > >
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)\n\tat
> > > >
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)\n\tat
> > > >
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat
> > > > org.eclipse.jetty.server.Server.handle(Server.java:368)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)\n\tat
> > > >
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\n\tat
> > > >
> > >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)\n\tat
> > > > java.lang.Thread.run(Thread.java:745)\n",
> > >
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
> <mk...@griddynamics.com>
>

Re: ArrayIndexOutOfBoundsException in ToParentBlockJoinQuery

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Hello Fasial,

It's convenient to use wt=csv to verify block layout (make sue that rows=
is high enough). Note, every span of children should be followed by parent.
see
http://blog.griddynamics.com/2013/12/grandchildren-and-siblings-with-block.html
Putting BRAND_s: clause into the {! which= } is absolutely wrong. That
param should contain only parent docs filter which differentiate them from
parents. Any parent level filters should be passed at the top level of
query or like fq=.


On Tue, Oct 14, 2014 at 8:33 AM, Faisal Mansoor <fa...@gmail.com>
wrote:

> Thanks Erick,
>
> I am using the 4.10.0 solr. To update any field, I first delete all
> existing documents matching _root_:id before inserting the updated version.
> So, I don't think that's causing the problem.
> Is there a way to validate the sanity of the index, are there any tools
> which can analyze the index and list problems or inconsistencies in the
> index?
>
> Thanks,
> Faisal
>
> On Mon, Oct 13, 2014 at 6:55 PM, Erick Erickson <er...@gmail.com>
> wrote:
>
> > What version of Solr? For Block Join you need to index all the docs
> > (parent/child) docs at once, and when they're updated they _all_ need
> > to be updated AFAIK.
> >
> > Best,
> > Erick
> >
> > On Mon, Oct 13, 2014 at 3:51 PM, Faisal Mansoor
> > <fa...@gmail.com> wrote:
> > > Hi,
> > >
> > > I am having problems running Parent Block Join Query in Solr. For some
> > > reasons the following query throws ArrayIndexOutOfBoundsException.
> > >
> > > {!type=parent which='type_s:(shirt) AND BRAND_s:(Puma)'}
> > > (type_s:(sku) AND SIZE_s:(XL))
> > >
> > >
> > > The index I am using is not that big, only has a few hundred entries.
> But
> > > it is frequently updated. Any clues what can cause this problem?
> > >
> > > Thanks.
> > > Faisal
> > >
> > > Here is the complete stack trace for the exception:
> > >
> > >
> > >     "trace": "java.lang.ArrayIndexOutOfBoundsException: -1\n\tat
> > >
> org.apache.lucene.codecs.lucene40.BitVector.get(BitVector.java:149)\n\tat
> > >
> >
> org.apache.lucene.search.join.ToParentBlockJoinQuery$BlockJoinScorer.nextDoc(ToParentBlockJoinQuery.java:293)\n\tat
> > >
> >
> org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:192)\n\tat
> > >
> >
> org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)\n\tat
> > > org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)\n\tat
> > >
> >
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)\n\tat
> > >
> >
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)\n\tat
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:209)\n\tat
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1619)\n\tat
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1433)\n\tat
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:514)\n\tat
> > >
> >
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:485)\n\tat
> > >
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)\n\tat
> > >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat
> > > org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)\n\tat
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)\n\tat
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)\n\tat
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)\n\tat
> > >
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat
> > >
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat
> > >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat
> > >
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\n\tat
> > >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat
> > >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat
> > >
> >
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat
> > >
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat
> > >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat
> > >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat
> > >
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat
> > >
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat
> > >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat
> > > org.eclipse.jetty.server.Server.handle(Server.java:368)\n\tat
> > >
> >
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)\n\tat
> > >
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\n\tat
> > >
> >
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)\n\tat
> > >
> >
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)\n\tat
> > > org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)\n\tat
> > >
> >
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)\n\tat
> > >
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\n\tat
> > >
> >
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)\n\tat
> > >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\n\tat
> > >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)\n\tat
> > > java.lang.Thread.run(Thread.java:745)\n",
> >
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>

Re: ArrayIndexOutOfBoundsException in ToParentBlockJoinQuery

Posted by Faisal Mansoor <fa...@gmail.com>.
Thanks Erick,

I am using the 4.10.0 solr. To update any field, I first delete all
existing documents matching _root_:id before inserting the updated version.
So, I don't think that's causing the problem.
Is there a way to validate the sanity of the index, are there any tools
which can analyze the index and list problems or inconsistencies in the
index?

Thanks,
Faisal

On Mon, Oct 13, 2014 at 6:55 PM, Erick Erickson <er...@gmail.com>
wrote:

> What version of Solr? For Block Join you need to index all the docs
> (parent/child) docs at once, and when they're updated they _all_ need
> to be updated AFAIK.
>
> Best,
> Erick
>
> On Mon, Oct 13, 2014 at 3:51 PM, Faisal Mansoor
> <fa...@gmail.com> wrote:
> > Hi,
> >
> > I am having problems running Parent Block Join Query in Solr. For some
> > reasons the following query throws ArrayIndexOutOfBoundsException.
> >
> > {!type=parent which='type_s:(shirt) AND BRAND_s:(Puma)'}
> > (type_s:(sku) AND SIZE_s:(XL))
> >
> >
> > The index I am using is not that big, only has a few hundred entries. But
> > it is frequently updated. Any clues what can cause this problem?
> >
> > Thanks.
> > Faisal
> >
> > Here is the complete stack trace for the exception:
> >
> >
> >     "trace": "java.lang.ArrayIndexOutOfBoundsException: -1\n\tat
> > org.apache.lucene.codecs.lucene40.BitVector.get(BitVector.java:149)\n\tat
> >
> org.apache.lucene.search.join.ToParentBlockJoinQuery$BlockJoinScorer.nextDoc(ToParentBlockJoinQuery.java:293)\n\tat
> >
> org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:192)\n\tat
> >
> org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)\n\tat
> > org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)\n\tat
> >
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)\n\tat
> >
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)\n\tat
> >
> org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:209)\n\tat
> >
> org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1619)\n\tat
> >
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1433)\n\tat
> >
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:514)\n\tat
> >
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:485)\n\tat
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)\n\tat
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat
> > org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)\n\tat
> >
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)\n\tat
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)\n\tat
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)\n\tat
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\n\tat
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat
> >
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat
> > org.eclipse.jetty.server.Server.handle(Server.java:368)\n\tat
> >
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)\n\tat
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\n\tat
> >
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)\n\tat
> >
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)\n\tat
> > org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)\n\tat
> >
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)\n\tat
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\n\tat
> >
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)\n\tat
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\n\tat
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)\n\tat
> > java.lang.Thread.run(Thread.java:745)\n",
>

Re: ArrayIndexOutOfBoundsException in ToParentBlockJoinQuery

Posted by Erick Erickson <er...@gmail.com>.
What version of Solr? For Block Join you need to index all the docs
(parent/child) docs at once, and when they're updated they _all_ need
to be updated AFAIK.

Best,
Erick

On Mon, Oct 13, 2014 at 3:51 PM, Faisal Mansoor
<fa...@gmail.com> wrote:
> Hi,
>
> I am having problems running Parent Block Join Query in Solr. For some
> reasons the following query throws ArrayIndexOutOfBoundsException.
>
> {!type=parent which='type_s:(shirt) AND BRAND_s:(Puma)'}
> (type_s:(sku) AND SIZE_s:(XL))
>
>
> The index I am using is not that big, only has a few hundred entries. But
> it is frequently updated. Any clues what can cause this problem?
>
> Thanks.
> Faisal
>
> Here is the complete stack trace for the exception:
>
>
>     "trace": "java.lang.ArrayIndexOutOfBoundsException: -1\n\tat
> org.apache.lucene.codecs.lucene40.BitVector.get(BitVector.java:149)\n\tat
> org.apache.lucene.search.join.ToParentBlockJoinQuery$BlockJoinScorer.nextDoc(ToParentBlockJoinQuery.java:293)\n\tat
> org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:192)\n\tat
> org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:163)\n\tat
> org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)\n\tat
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)\n\tat
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)\n\tat
> org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:209)\n\tat
> org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1619)\n\tat
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1433)\n\tat
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:514)\n\tat
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:485)\n\tat
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)\n\tat
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat
> org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)\n\tat
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)\n\tat
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)\n\tat
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)\n\tat
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\n\tat
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat
> org.eclipse.jetty.server.Server.handle(Server.java:368)\n\tat
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)\n\tat
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\n\tat
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)\n\tat
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)\n\tat
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)\n\tat
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)\n\tat
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\n\tat
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)\n\tat
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\n\tat
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)\n\tat
> java.lang.Thread.run(Thread.java:745)\n",