简体   繁体   English

当索引有数据时,Solr没有返回结果

[英]Solr no result returned when index has data

I've got a Solr instance (version 1.4) that is returning no results when searching using *:* via its web interface. 我有一个Solr实例(1.4版),通过它的Web界面使用*:*搜索时没有返回任何结果。

I checked it's SolrHome to check it's index. 我检查了它的SolrHome来检查它的索引。 I can verify that there is available content found in data/index/ 我可以确认在data/index/找到了可用的内容

I also checked solrconfig.xml for dataDir element as defined here and confirm that it does point to the above directory. 我还检查了solrconfig.xml是否有此处定义的dataDir元素,并确认它确实指向上述目录。

I've checked the catalina and tomcat6-stderr logs found in ..\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\logs and found no errors. 我检查了.. \\ Program Files \\ Apache Software Foundation \\ Tomcat 6.0 \\ logs中找到的catalina和tomcat6-stderr日志,未发现任何错误。

The only thing that I can think of is that within the Apache Software Foundation\\Tomcat 6.0 is a solr directory that has an empty data/index directory but I can't find where this could be referenced in solrconfig.xml 我唯一能想到的是,在Apache Software Foundation \\ Tomcat 6.0中是一个solr目录,其中的数据/索引目录为空,但是我无法在solrconfig.xml中找到该目录。

Does anyone have any idea why this could be happening? 有谁知道为什么会这样?

Update 更新资料

Looking at the web interfaces' statistics, it shows a core called "searcher" with numDocs: 0. 查看Web界面的统计信息,它显示了一个名为numDocs:0的“搜索器”核心。

If you have numDocs: 0 , you don't have any documents in your index. 如果您有numDocs: 0 ,则索引中没有任何文档。 You can still have index files around if optimize hasn't been invoked on your index (ie all documents that were available has been marked as deleted, but the index hasn't been rewritten - so those documents hasn't been expunged), and an empty index will still have a few files around with ignorable sizes. 如果未在索引上调用optimize,您仍然可以拥有索引文件(即,所有可用的文档都被标记为已删除,但是索引没有被重写,因此这些文档没有被删除),并且空索引仍然会包含一些大小可忽略的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM