lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christine Poerschke (BLOOMBERG/ LONDON)" <cpoersc...@bloomberg.net>
Subject Re:NPE when executing clustering query search
Date Wed, 16 Nov 2016 11:04:44 GMT
Hi Tim,

Thanks for reporting this. The (just created) https://issues.apache.org/jira/browse/SOLR-9775
issue and associated pull request sound related to this.

Regards,

Christine

----- Original Message -----
From: solr-user@lucene.apache.org
To: solr-user@lucene.apache.org
At: 03/22/16 14:49:20

Hi everyone,

I am trying to execute a clustering query to my single-core master-slave
solr setup and it is returning a NullPointerException.  I checked the line
in the source code where it is being thrown, and it looks like the null
object is some sort of 'filt' object, which doesn't make sense.  Below is
the query, my schema, solrconfig, and the exception.  If anyone could
please help that would be great!

Thank you!

QUERY:

1510649 [qtp1855032000-20] INFO  org.apache.solr.core.SolrCore  û
[collection1] webapp=/solr
path=/clustering
params{
mlt.minwl=3&
mlt.boost=true&
mlt.fl=textpropertymlt&
sort=score+desc&
carrot.snippet=impnoteplain&
mlt.mintf=1&
qf=concept_name&
mlt.interestingTerms=details&
wt=javabin&
clustering.engine=lingo&
version=2&
rows=500&
mlt.mindf=2&
debugQuery=true&
fl=id,concept_name,impnoteplain&
start=0&
q=id:567065dc658089be9f5c2c0d5670653d658089be9f5c2ae2&
carrot.title=concept_name&
clustering.results=true&
qt=/clustering&
fq=storeid:5670653d658089be9f5c2ae2&
fq={!edismax+v%3D''+qf%3D'textpropertymlt'+mm%3D'2<40%25'}&carrot.url=id&clustering=true}
status=500 QTime=217

ERROR:

1510697 [qtp1855032000-20] ERROR org.apache.solr.servlet.SolrDispatchFilter
 û null:java.lang.NullPointerException
        at
org.apache.solr.search.QueryResultKey.<init>(QueryResultKey.java:53)
        at
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1416)
        at
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:586)
        at
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:511)
        at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:235)
        at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:144)
        at
org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:291)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:2006)
        at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)
        at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:413)
        at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:204)
        at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
        at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
        at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
        at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
        at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
        at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
        at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
        at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
        at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:368)
        at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
        at
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
        at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
        at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
        at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
        at
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
        at
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Unknown Source)


SCHEMA.XML:

   <!-- Common -->
   <field name="id" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
   <field name="conceptid" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
   <field name="storeid" type="string" indexed="true" stored="true"
required="true" multiValued="false"/>

   <!-- Concept -->
   <field name="concept_name" type="text_general" multiValued="true"
indexed="true" stored="true" termVectors="true"/>
   <field name="concept_name_sort" type="string" multiValued="false"
indexed="true" stored="false"/> <!-- will store the main name not the
aliases here -->
   <field name="concept_name_pho" type="textpre" multiValued="true"
indexed="true" stored="false"/>
   <!-- For indexing notes with document -->
   <dynamicField name="*_note" type="text_general" indexed="true"
stored="true" multiValued="true" termOffsets="true" termVectors="true"
termPositions="true" />
   <!--
Setting this to true will cause a problem with atomic updates.  See case
#440 on git.
   -->
   <field name="textproperty" type="text_general" indexed="true"
stored="false" multiValued="true" termOffsets="true" termVectors="true"
termPositions="true" />
   <copyField source="*_note" dest="textproperty"/>

   <field name="impnoteplain" type="text_general" indexed="true"
stored="true" multiValued="true" termOffsets="true" termVectors="true"
termPositions="true" />


   <!-- Named Entities -->
   <field name="location" type="string" indexed="true" stored="true"
multiValued="true"/>

   <!-- Note -->

   <field name="latlon" type="locationType" indexed="true" stored="true"
multiValued="true"/>
   <fieldType name="locationType"
class="solr.SpatialRecursivePrefixTreeFieldType" geo="true" />

   <field name="noteid" type="string" indexed="true" stored="true" />
   <field name="note_text" type="text_general" indexed="true"
stored="false" multiValued="true"/>
   <field name="note_text_pho" type="textpre" indexed="true"
stored="false"/>
   <field name="note_tag" type="string" indexed="true" stored="false"/>c

   <!-- File -->
   <field name="file_text" type="text_general" indexed="true"
stored="false"/>
   <field name="file_text_pho" type="textpre" indexed="true"
stored="false"/>

   <field name="tags" type="string" indexed="true" stored="true"
multiValued="true" />

<!--
   <field name="sku" type="text_en_splitting_tight" indexed="true"
stored="true" omitNorms="true"/>
   <field name="name" type="text_general" indexed="true" stored="true"/>
   <field name="manu" type="text_general" indexed="true" stored="true"
omitNorms="true"/>
   <field name="cat" type="string" indexed="true" stored="true"
multiValued="true"/>
   <field name="features" type="text_general" indexed="true" stored="true"
multiValued="true"/>
   <field name="includes" type="text_general" indexed="true" stored="true"
termVectors="true" termPositions="true" termOffsets="true" />

   <field name="weight" type="float" indexed="true" stored="true"/>
   <field name="price"  type="float" indexed="true" stored="true"/>
   <field name="popularity" type="int" indexed="true" stored="true" />
   <field name="inStock" type="boolean" indexed="true" stored="true" />

   <field name="store" type="location" indexed="true" stored="true"/>
-->

   <!-- Common metadata fields, named specifically to match up with
     SolrCell metadata when parsing rich documents such as Word, PDF.
     Some fields are multiValued only because Tika currently may return
     multiple values for them. Some metadata is parsed from the documents,
     but there are some which come from the client context:
       "content_type": From the HTTP headers of incoming stream
       "resourcename": From SolrCell request param resource.name
   <field name="title" type="text_general" indexed="true" stored="true"
multiValued="true"/>
   <field name="subject" type="text_general" indexed="true" stored="true"/>
   <field name="description" type="text_general" indexed="true"
stored="true"/>
   <field name="comments" type="text_general" indexed="true" stored="true"/>
   <field name="author" type="text_general" indexed="true" stored="true"/>
   <field name="keywords" type="text_general" indexed="true" stored="true"/>
   <field name="category" type="text_general" indexed="true" stored="true"/>
   <field name="resourcename" type="text_general" indexed="true"
stored="true"/>
   <field name="url" type="text_general" indexed="true" stored="true"/>
   <field name="content_type" type="string" indexed="true" stored="true"
multiValued="true"/>
   <field name="last_modified" type="date" indexed="true" stored="true"/>
   <field name="links" type="string" indexed="true" stored="true"
multiValued="true"/>
   -->

   <!-- Main body of document extracted by SolrCell.
        NOTE: This field is not indexed by default, since it is also copied
to "text"
        using copyField below. This is to save space. Use this field for
returning and
        highlighting document content. Use the "text" field to search the
content.
   <field name="content" type="text_general" indexed="false" stored="true"
multiValued="true"/>
-->

   <!-- catchall field, containing all other searchable text fields
(implemented
        via copyField further on in this schema  -->
   <field name="text" type="text_general" indexed="true" stored="false"
multiValued="true"/>

   <!-- Used by MoreLikeThis -->
   <dynamicField name="*_mlt" stored="true" indexed="true"
type="text_general" termVectors="true" multiValued="true" />

   <field name="textpropertymlt" type="text_general" indexed="true"
stored="true" multiValued="true" termVectors="true"  />

   <copyField source="*_mlt" dest="textpropertymlt"/>


SOLR CONFIG.XML:

  <requestHandler name="/clustering"
                  startup="lazy"
                  enable="${solr.clustering.enabled:true}"
                  class="solr.SearchHandler">
    <lst name="defaults">
    </lst>
    <arr name="last-components">
      <str>clustering</str>
    </arr>
  </requestHandler>

Mime
View raw message