本文介绍了Solr Ping 查询导致异常:未定义的字段文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的服务器上做一些工作,但遇到了问题.当我尝试通过管理面板 ping 服务器时出现此错误,我认为这可能是导致问题的原因:

Im trying to do some work on my server but running into problems. When I try to ping the server through the admin panel I get this error, which I believe might be causing the problem:

服务器遇到内部错误(Ping查询导致异常:未定义的字段文本 org.apache.solr.common.SolrException:Ping 查询导致异常:未定义的字段文本在org.apache.solr.handler.PingRequestHandler.handleRequestBody(PingRequestHandler.java:76)在org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)在 org.apache.solr.core.SolrCore.execute(SolrCore.java:1376) 在org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365)在org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260)在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)在

任何人都可以给我一些关于可能出现什么问题的指导吗?我正在使用 Solr 3.6.我认为这可能与 schema.xml 中定义的文本"有关??

Can anyone give me a bit of guideance as to what might be going wrong? I'm using Solr 3.6. I think it may be to do with the defined "text" in the schema.xml??

这是我目前的架构:https://gist.github.com/3689621

任何帮助将不胜感激.

詹姆斯

推荐答案

根据错误,我猜测/admin/ping requestHandler 中定义的查询正在搜索名为 text,您没有在架构中定义.

Based on the error, I am guessing that the query that is defined in the /admin/ping requestHandler is searching against a field named text, which you do not have defined in your schema.

这是一个典型的 ping requestHandler 部分

Here is a typical ping requestHandler section

<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
  <lst name="invariants">
    <str name="q">solrpingquery</str>
  </lst>
  <lst name="defaults">
    <str name="qt">standard</str>
    <str name="echoParams">all</str>
    <str name="df">text</str>
  </lst>
</requestHandler>

注意 <str name="df">text<str> 的设置.这是 ping 将针对其执行搜索的默认字段.您应该将其更改为在您的架构中定义的字段,可能是基于您的架构的 titledescription.

Note how the <str name="df">text<str> setting. This is the default field that the ping will execute the search against. You should change this to a field that is defined in your schema, perhaps, title or description based on your schema.

这篇关于Solr Ping 查询导致异常:未定义的字段文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 09:51