solr建议者不为大数据工作

时间:2017-11-07 06:14:10

标签: solr timeout solrcloud

我有solrcloud设置,在8个节点上有1.1亿个文档。我正在尝试在文档ID上构建建议字典。

以下是我在solrconfig.xml中使用的配置

<searchComponent name="suggestdocid" class="solr.SuggestComponent">
    <lst name="suggester">
      <str name="name">suggestdocid</str>
      <str name="lookupImpl">FuzzyLookupFactory</str>
      <str name="storeDir">suggester_fuzzy_dir</str>
      <str name="dictionaryImpl">DocumentDictionaryFactory</str>
      <str name="field">docid</str>
      <str name="suggestAnalyzerFieldType">lower_string</str>
      <str name="payloadField">title</str>
      <str name="weightField">docid</str>
      <str name="exactMatchFirst">true</str>
      <str name="nonFuzzyPrefix">3</str>
      <str name="preserveSep">false</str>
      <str name="maxEdits">0</str>
      <str name="buildOnStartup">false</str>
      <str name="buildOnCommit">false</str>
    </lst>
</searchComponent>

<requestHandler name="/suggestdocid" class="solr.SearchHandler" startup="lazy" >
    <lst name="defaults">
      <str name="suggest">true</str>
      <str name="suggest.count">10</str>
      <str name="suggest.dictionary">suggestdocid</str>
      <bool name="distrib">true</bool>
      <str name="shards.qt">/suggestdocid</str>
    </lst>
    <arr name="components">
      <str>suggestdocid</str>
    </arr>
</requestHandler>

注意:我在这里使用有效负载,因为我想在用户搜索docid时显示docid,然后显示相应的标题。

当我尝试构建这个字典时,它会抛出以下错误。

org.apache.solr.common.SolrException:org.apache.solr.client.solrj.SolrServerException:等待来自org.apache.solr.handler.component的http://server2:8983/solr/doccollection_shard7_replica1服务器的响应时发生超时。 SearchAandler.handleRequestBody(SearchHandler.java:416)org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)at org .apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter) .java:361)org.eap上的org.eclipse.jet.servache.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1691)中的org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)。 orm.eclipse.jet.SecurityHandler.ha上的org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)中的jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582) ndle(SecurityHandler.java:548)org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) org.eclipse.jetty.server中的org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)org.eclipse.jetty.doScope.sev。 org.eclipse.jetty上的org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)的.ContextHandler.doScope(ContextHandler.java:1112)org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java :213)在org.eclipse上的org.eclipse.jetty.server.handle.HandlerCollection.handle(HandlerCollection.java:119)org.eclipse.jetty.handle.HandlerWrapper.handle(HandlerWrapper.java:134)。在org.eclipse.jetty.server.S的org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)的jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335) org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)的orver.handle(Server.java:534)org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)org .eclipse.jetty.io.AbstractConnection $ ReadCallback.succeeded(AbstractConnection.java:273)atg.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)org.eclipse.jetty.io.SelectChannelEndPoint $ 2。在Org.eclipse.jetty.uread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)的org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume。)中运行(SelectChannelEndPoint.java:93)。 java:148)org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)at org java.lang.Thread.run中的.eclipse.jetty.util.thread.QueuedThreadPool $ 2.run(QueuedThreadPool.java:589)(Thread.java:745)引起:org.apache.solr.client.solrj .SolrServerException:等待来自org.apache.solr.client.solrj的org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:621)的服务器位于http://server2:8983/solr/doccollection_shard7_replica1的响应时发生超时位于org.apache.solr.client.solrj.SolrClient.request的org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:268)中的.impl.HttpSolrClient.request(HttpSolrClient.java:279) (solrClient.java:1219)org.apache.solr.handler.component.HttpShardHandler.lambda $在java.util.concurrent.FutureTask.run(FutureTask.java:266)上提交$ 0(HttpShardHandler.java:163) .util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at com.codahale.metrics.InstrumentedExecutorService $ InstrumentedRunnable.run(InstrumentedExecutorService.java) :176)at org.apache.solr.common.util.ExecutorUtil $ MDCAwareThreadPoolExecutor.lambda $ execute $ 0(ExecutorUtil.java:229)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolE) xecutor.java:1142)在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)... 1更多引起:java.net.SocketTimeoutException:在java.net.SocketInputStream.socketRead0读取超时时间(java方法)java.net.SocketInputStream.socketRead(SocketInputStream.java:116),java.net.SocketInputStream.read(SocketInputStream.java:170),java.net.SocketInputStream.read(SocketInputStream.java:141)at Org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)位于org.apache.http.impl的org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)。 io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:273)org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser。 java:57)at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)at at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:283)位于org.apache.http.impl.conn的org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:251)。位于org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)的oraged.Adache.Tartocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)中的ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:197)位于org.apache.http.impl.client的org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:685)中的.apache.solr.util.stats.InstrumentedHttpRequestExecutor.execute(InstrumentedHttpRequestExecutor.java:114) .defaultRequestDirector.execute(DefaultRequestDirector.java:487)org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java :82)在org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:515)... 12更多< / p>

有关如何解决此问题的任何建议?

0 个答案:

没有答案