lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aniket potdar <anitoc...@gmail.com>
Subject Solr Suggester not working in sharding (distributed search)
Date Mon, 17 Feb 2014 10:31:56 GMT
I have two solr server (solr 4.5.1) which is running in shard..

I have implemented solr suggester using spellcheckComponent for
auto-suggester.

when i execute suggest url on individual core then the solr suggestion is
coming properly.

http://localhost:8986/solr/core1/suggest?spellcheck.q=city%20of and 
http://localhost:8987/solr/core1/suggest?spellcheck.q=city%20of

when i fired url with refence to solr wiki
(https://wiki.apache.org/solr/SpellCheckComponent#Distributed_Search_Support)
the result is not coming and below exception is occur.


URL :-
http://localhost:8986/solr/core1/select?shards=localhost:8986/solr/core1,localhost:8987/solr/core1&spellcheck.q=city%20of&shards.qt=%2Fsuggest&qt=suggest

java.lang.NullPointerException at
org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:843)
at
org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:649)
at
org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:628)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:311)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1859) at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:703)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:406)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195)
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(Thread.java:619)

 
for reference below is my schema.xml and solrconfig.xml entry

<searchComponent class="solr.SpellCheckComponent" name="suggest">
    <lst name="spellchecker">
      <str name="name">suggest</str>
      <str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
      <str
name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookupFactory</str>
      <str name="field">sugg</str> 
      <str name="buildOnCommit">true</str>
    </lst>
  </searchComponent>

<requestHandler class="org.apache.solr.handler.component.SearchHandler"
name="/suggest">
    <lst name="defaults">
      <str name="spellcheck">on</str>
      <str name="spellcheck.dictionary">suggest</str>
      <str name="spellcheck.onlyMorePopular">true</str>
      <str name="spellcheck.count">10</str>
      <str name="spellcheck.collate">true</str>
    </lst>
    <arr name="components">
      <str>suggest</str>
    </arr>
  </requestHandler> 


<fieldType name="text_autocomplete" class="solr.TextField"
positionIncrementGap="100">
        <analyzer>
            <tokenizer class="solr.KeywordTokenizerFactory"/>
            <filter class="solr.LowerCaseFilterFactory"/>
            <filter class="solr.TrimFilterFactory"/>
            <filter class="solr.SynonymFilterFactory" synonyms="syn.txt"
ignoreCase="true" expand="true"/>
            <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
        </analyzer>
</fieldType>

i have unique filed, id which is store = true in schema.xml

can any one please suggest the solution.



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Suggester-not-working-in-sharding-distributed-search-tp4117732.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message