程序问答   发布时间:2022-06-01  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了基本 Solr 云分组大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决基本 Solr 云分组?

开发过程中遇到基本 Solr 云分组的问题如何解决?下面主要结合日常开发的经验,给出你关于基本 Solr 云分组的解决方法建议,希望对你解决基本 Solr 云分组有所启发或帮助;

我正在尝试进行简单的群组通话。这是在具有 6 个分片和 60m 文档的分布式 solr 实例上。 我可以在通话时拨打相同的电话 一个非分布式索引 - 然后它起作用了。我的理解是只要您不使用 ngroups、group.func 和 group.faCET,group 仍然适用于分布式索引。

https://solr.apache.org/guide/8_6/result-grouping.html#diStributed-result-grouping-caveats 根据分片的数量,我得到了两个不同的错误。这适用于 1 个分片,因此它似乎适用于分布式搜索。我从 8.6 开始,但后来更新到 8.8.1。我的 solr 实例在 Kubernetes 中运行。我们已经完全拆除了实例并重新实例化了它。没运气。 我在另一个实例上有另一个集合,它有 3 个分片并使用一个基本的字符串字段 - 它可以工作。

场景 1 - 原版

{
  "responseheader":{
    "zkConnected":true,"status":500,"QTime":833,"params":{
      "q":"*:*","group.fIEld":"contractnumber","_":"1618516270590","group":"true"}},"error":{
    "Metadata":[
      "error-class","org.apache.solr.common.solrException","root-error-class","org.apache.solr.clIEnt.solrj.impl.basehttpSolrClIEnt$RemoteSolrException"],"msg":"org.apache.solr.clIEnt.solrj.solrserverException: No live Solrservers available to handle this request:...
    "code":500}}

<fIEld name="contractnumber" type="text" docValues="true" indexed="true" required="false" stored="false" useDocValuesAsstored="true"/>

<fIEldType name="text" class="solr.sortableTextFIEld" omitnorms="true" positionIncrementGap="100">
    <analyzer type="index">
      <tokenizer class="solr.KeywordTokenizerFactory"/>
      <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
    <analyzer type="query">
      <tokenizer class="solr.KeywordTokenizerFactory"/>
      <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
  </fIEldType>

Shard count:6
configname: myConfig
ReplicationFactor:3
maxShardsPerNode:10
router:compositEID
autoaddReplicas:false

情景2 2 个分片,字段现在是一个字符串。

{
  "responseheader":{
    "zkConnected":true,"QTime":26,"_":"1618582691970","org.apache.solr.clIEnt.solrj.impl.basehttpSolrClIEnt$RemoteSolrException","msg":"Error from server at null: java.lang.NullPointerException\n\tat org.apache.solr.scheR_210_11845@a.FIEldType.toExternal(FIEldType.java:361)\n\tat org.apache.solr.search.grouPing.diStributed.shardresultserializer.topGroupsResulttransformer.serializetopGroups(topGroupsResulttransformer.java:210)\n\tat org.apache.solr.search.grouPing.diStributed.shardresultserializer.topGroupsResulttransformer.transform(topGroupsResulttransformer.java:77)\n\tat org.apache.solr.search.grouPing.diStributed.shardresultserializer.topGroupsResulttransformer.transform(topGroupsResulttransformer.java:57)\n\tat org.apache.solr.search.grouPing.CommandHandler.processResult(CommandHandler.java:214)\n\tat org.apache.solr.handler.component.queryComponent.doprocessGroupeddiStributedSearchSecondPhase(queryComponent.java:1424)\n\tat org.apache.solr.handler.component.queryComponent.process(queryComponent.java:386)\n\tat org.apache.solr.handler.component.SearchHandler.handlerequestbody(SearchHandler.java:355)\n\tat org.apache.solr.handler.requestHandlerBase.handlerequest(requestHandlerBase.java:216)\n\tat org.apache.solr.core.solrCore.execute(SolrCore.java:2646)\n\tat org.apache.solr.servlet.httpSolrCall.execute(httpSolrCall.java:794)\n\tat org.apache.solr.servlet.httpSolrCall.call(httpSolrCall.java:567)\n\tat org.apache.solr.servlet.solrdispatchFilter.doFilter(SolrdispatchFilter.java:427)\n\tat org.apache.solr.servlet.solrdispatchFilter.doFilter(SolrdispatchFilter.java:357)\n\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)\n\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:516)\n\tat org.eclipse.jetty.server.httpChAnnel.lambda$handle$1(httpChAnnel.java:383)\n\tat org.eclipse.jetty.server.httpChAnnel.dispatch(httpChAnnel.java:556)\n\tat org.eclipse.jetty.server.httpChAnnel.handle(httpChAnnel.java:375)\n\tat org.eclipse.jetty.server.httpChAnnel.run(httpChAnnel.java:335)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.runTask(EatwhatYouKill.java:336)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.doproduce(EatwhatYouKill.java:313)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.tryProduce(EatwhatYouKill.java:171)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.produce(EatwhatYouKill.java:135)\n\tat org.eclipse.jetty.http2.http2Connection.produce(http2Connection.java:183)\n\tat org.eclipse.jetty.http2.http2Connection.onFillable(http2Connection.java:138)\n\tat org.eclipse.jetty.http2.http2Connection$FillableCallBACk.succeeded(http2Connection.java:361)\n\tat org.eclipse.jetty.io.Fillinterest.fillable(Fillinterest.java:105)\n\tat org.eclipse.jetty.io.ChAnnelEndPoint$1.run(ChAnnelEndPoint.java:104)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.runTask(EatwhatYouKill.java:336)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.doproduce(EatwhatYouKill.java:313)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.tryProduce(EatwhatYouKill.java:171)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.run(EatwhatYouKill.java:129)\n\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)\n\tat java.base/java.lang.Thread.run(UnkNown sourcE)\n","trace":"org.apache.solr.clIEnt.solrj.impl.basehttpSolrClIEnt$RemoteSolrException: Error from server at null: java.lang.NullPointerException\n\tat org.apache.solr.scheR_210_11845@a.FIEldType.toExternal(FIEldType.java:361)\n\tat org.apache.solr.search.grouPing.diStributed.shardresultserializer.topGroupsResulttransformer.serializetopGroups(topGroupsResulttransformer.java:210)\n\tat org.apache.solr.search.grouPing.diStributed.shardresultserializer.topGroupsResulttransformer.transform(topGroupsResulttransformer.java:77)\n\tat org.apache.solr.search.grouPing.diStributed.shardresultserializer.topGroupsResulttransformer.transform(topGroupsResulttransformer.java:57)\n\tat org.apache.solr.search.grouPing.CommandHandler.processResult(CommandHandler.java:214)\n\tat org.apache.solr.handler.component.queryComponent.doprocessGroupeddiStributedSearchSecondPhase(queryComponent.java:1424)\n\tat org.apache.solr.handler.component.queryComponent.process(queryComponent.java:386)\n\tat org.apache.solr.handler.component.SearchHandler.handlerequestbody(SearchHandler.java:355)\n\tat org.apache.solr.handler.requestHandlerBase.handlerequest(requestHandlerBase.java:216)\n\tat org.apache.solr.core.solrCore.execute(SolrCore.java:2646)\n\tat org.apache.solr.servlet.httpSolrCall.execute(httpSolrCall.java:794)\n\tat org.apache.solr.servlet.httpSolrCall.call(httpSolrCall.java:567)\n\tat org.apache.solr.servlet.solrdispatchFilter.doFilter(SolrdispatchFilter.java:427)\n\tat org.apache.solr.servlet.solrdispatchFilter.doFilter(SolrdispatchFilter.java:357)\n\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)\n\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:516)\n\tat org.eclipse.jetty.server.httpChAnnel.lambda$handle$1(httpChAnnel.java:383)\n\tat org.eclipse.jetty.server.httpChAnnel.dispatch(httpChAnnel.java:556)\n\tat org.eclipse.jetty.server.httpChAnnel.handle(httpChAnnel.java:375)\n\tat org.eclipse.jetty.server.httpChAnnel.run(httpChAnnel.java:335)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.runTask(EatwhatYouKill.java:336)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.doproduce(EatwhatYouKill.java:313)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.tryProduce(EatwhatYouKill.java:171)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.produce(EatwhatYouKill.java:135)\n\tat org.eclipse.jetty.http2.http2Connection.produce(http2Connection.java:183)\n\tat org.eclipse.jetty.http2.http2Connection.onFillable(http2Connection.java:138)\n\tat org.eclipse.jetty.http2.http2Connection$FillableCallBACk.succeeded(http2Connection.java:361)\n\tat org.eclipse.jetty.io.Fillinterest.fillable(Fillinterest.java:105)\n\tat org.eclipse.jetty.io.ChAnnelEndPoint$1.run(ChAnnelEndPoint.java:104)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.runTask(EatwhatYouKill.java:336)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.doproduce(EatwhatYouKill.java:313)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.tryProduce(EatwhatYouKill.java:171)\n\tat org.eclipse.jetty.util.thread.strategy.EatwhatYouKill.run(EatwhatYouKill.java:129)\n\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)\n\tat java.base/java.lang.Thread.run(UnkNown sourcE)\n\n\tat org.apache.solr.clIEnt.solrj.impl.http2SolrClIEnt.processErrorsAndResponse(http2SolrClIEnt.java:742)\n\tat org.apache.solr.clIEnt.solrj.impl.http2SolrClIEnt.request(http2SolrClIEnt.java:412)\n\tat org.apache.solr.clIEnt.solrj.impl.http2SolrClIEnt.request(http2SolrClIEnt.java:761)\n\tat org.apache.solr.clIEnt.solrj.solrClIEnt.request(SolrClIEnt.java:1290)\n\tat org.apache.solr.handler.component.httpShardHandler.request(httpShardHandler.java:80)\n\tat org.apache.solr.handler.component.Shardrequestor.call(Shardrequestor.java:130)\n\tat org.apache.solr.handler.component.Shardrequestor.call(Shardrequestor.java:41)\n\tat java.base/java.util.concurrent.FutureTask.run(UnkNown sourcE)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(UnkNown sourcE)\n\tat java.base/java.util.concurrent.FutureTask.run(UnkNown sourcE)\n\tat com.codahale.metrics.instrumentedExecutorservice$instrumentedRunnable.run(instrumentedExecutorservice.java:180)\n\tat org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:218)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(UnkNown sourcE)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(UnkNown sourcE)\n\tat java.base/java.lang.Thread.run(UnkNown sourcE)\n","code":500}}


<fIEld name="contractnumber" type="String" docValues="false" indexed="true" required="false" stored="true" useDocValuesAsstored="false"/>


Shard count:2
configname:myConfigSet
ReplicationFactor:3
maxShardsPerNode:5
router:compositEID
autoaddReplicas:false
 

一个显示错误,指出“没有可用的实时 Solrservers 可用于处理此请求:...”,一个是“空指针异常”。当我有 3 个以上的分片时,它总是第一个错误。如果我深入挖掘,我确实看到了 Null 指针异常,所以我想象它只是如何在更大的分布式集上转发错误。

我真的希望我只是做错了什么。有什么想法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的基本 Solr 云分组全部内容,希望文章能够帮你解决基本 Solr 云分组所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:基本