Il giorno giovedì 12 giugno 2014 11:31:07 UTC-7, Diego Marchi ha scritto:
>
>
> Hi all,
>
> I have a distributed environment in SOLR with 4 cores. Each core has
> approx 100m documents. We are maintaining the database of documents since
> version 2 of solr I think, so many documents do not respect the schema we
> set with the latest solr version. (Now we are running version 4.8 - the
> current schema has a uniqueid field set, while it wasn't present in the
> earlier versions. This unique field is unsurprisingly called "id" but not
> all the documents have it.)
>
> Bow I'm trying to perform a distributed search on some random words
> belonging to the English dictionary. It works for most of the time but,
> from time to time, it returns back a NullPointerException I cannot track
> down:
>
>>
>> {
>> "responseHeader":{
>> "status":500,
>> "QTime":229,
>> "params":{
>> "shards":"http://x.x.x.x:p/solr/collection2",
>> "indent":"true",
>> "start":"0",
>> "q":"content:suppleness",
>> "wt":"json",
>> "fq":"website:523",
>> "rows":"10"}},
>> "error":{
>> "trace":"java.lang.NullPointerException\n\tat
>> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:962)\n\tat
>> org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:686)\n\tat
>> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:665)\n\tat
>> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:324)\n\tat
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat
>> org.apache.solr.core.SolrCore.execute(SolrCore.java:1952)\n\tat
>> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774)\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:744)\n",
>> "code":500}}
>
>
> I tried to release the lock on files ( I read somewhere it could be that
> causing the exception), I tried also to add the shards.qt param with no
> success. I was thinking it could be the fact that some of these pages are
> missing fields and have not the same structure as the others... so I
> checked how to add a field but for me it's impossible since I don't have
> all my fields stored in solr (some of them are just indexed).
>
> The funny thing is that if I query the same collection on a different term
> it works fine...
>
> This is the query I ran and failing
> http://x.x.x.x:p
> /solr/collection1/select?q=content:suppleness&fq=website:523&wt=json&indent=true&shards=http://x.x.x.x:p
> /solr/collection2,http://x.x.x.x:p/solr/collection1,http://x.x.x.x:p
> /solr/collection3,http://x.x.x.x:p/solr/collection4
>
> This is the query I tested to filter the fields only with the id field
> before the actual query:
> http://x.x.x.x:p/solr/collection1/select?q=content:suppleness&fq=website:523
> AND id:[* TO *]&wt=json&indent=true&shards=http://x.x.x.x:p
> /solr/collection2,http://x.x.x.x:p/solr/collection1,http://x.x.x.x:p
> /solr/collection3,http://x.x.x.x:p/solr/collection4
>
> if I run the same query on the SOLR single core instance, holding all the
> documents, it works just fine.
> If I change the word (eg "cat" instead of "suppleness") in the distributed
> search it works fine too.
>
> I then tried to isolate the core where the exception happens and it seems
> to be core 2. (this command in fact triggers the exception, while checking
> in other cores simply gives me back that numFound=0)
> http://x.x.x.x:p
> /solr/select?q=content:suppleness&fq=website:523&wt=json&indent=true&shards=http://x.x.x.x:p
> /solr/collection2
>
> but if I query directly the core (without sharding) I obtain the results
> with no problems:
> http://x.x.x.x:p
> /solr/collection2/select?q=content:suppleness&fq=website:523&wt=json&indent=true
>
>
>
> Any suggestion?
>
> Thanks!
>