【问题标题】:Solr config Woes -- solr running but not indexingSolr 配置问题 - solr 正在运行但未建立索引
【发布时间】:2011-04-20 09:35:13
【问题描述】:

我刚刚开始使用 Solr,从 Tomcat6 运行它。我按照所有安装说明进行操作,webapp 似乎运行良好。我使用 curl 来发送 solr 启动示例中的示例数据,并且服务器似乎返回了成功索引 someting 时应该返回的内容:

<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int name="QTime">4</int></lst>
</response>

但是当我通过 admin/stats 界面检查索引时,没有任何内容进入索引。它甚至没有注册请求??

searcherName : Searcher@5cd73256 main 
caching : true 
numDocs : 0 
maxDoc : 0 
reader : SolrIndexReader{this=ec5aba9,r=ReadOnlyDirectoryReader@ec5aba9,refCnt=1,segments=0} 
readerDir : org.apache.lucene.store.NIOFSDirectory@/home/tomcat6/solr/data/index 
indexVersion : 1266212874907 
openedAt : Fri Apr 15 13:46:52 EDT 2011 
registeredAt : Fri Apr 15 13:46:52 EDT 2011 
warmupTime : 0 

我真的很好奇这一行:readerDir : org.apache.lucene.store.NIOFSDirectory@/home/tomcat6/solr/data/index

因为这在服务器上不存在,所以我的索引位于 /home/myhome/solr/data/index

我通过 webapps web.xml env 标签配置了 solr home。并且正确的主页显示在主管理屏幕中

有什么想法可以让我的索引正常工作吗?

提前谢谢。

--dm

【问题讨论】:

    标签: configuration solr


    【解决方案1】:

    您可能忘记提交新文档,例如添加后:

    curl http://localhost:8983/solr/update -F stream.body=' <commit />'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-06
      • 1970-01-01
      • 2012-05-20
      • 1970-01-01
      • 2013-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多