繁体   English   中英

Numdocs在Solr Admin中显示为0

[英]Numdocs appearing as 0 in Solr Admin

我一直在尝试与Cassandra一起建立Solr并遇到问题。 我一直在关注本教程: http : //docs.datastax.com/en/archived/datastax_enterprise/4.0/datastax_enterprise/srch/srchTutCreatTab.html 我知道它已经过时了,但是我认为它仍然可以像在Cassandra 3.10上一样工作(也许这就是为什么我遇到问题了?)。 无论如何,我创建了一个新的键空间( CREATE KEYSPACE stacko WITH REPLICATION ={'class':'NetworkTopologyStrategy', 'datacenter1':1}; )和表( CREATE TABLE test1 ( name text PRIMARY KEY, address text, age int, solr_query text); )。 然后,我成功地将4行添加到数据库中。

我的schema.xml看起来像这样:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<schema name="TestSolrSchema" version="1.5">
<types>
<fieldType class="org.apache.solr.schema.StrField" name="StrField"/>
<fieldType class="org.apache.solr.schema.TrieIntField" 
name="TrieIntField"/>
</types>
<fields>
<field docValues="true" indexed="true" multiValued="false" name="name" stored="true" type="StrField"/>
<field docValues="true" indexed="true" multiValued="false" name="address" stored="true" type="StrField"/>
<field docValues="true" indexed="true" multiValued="false" name="age" stored="true" type="TrieIntField"/>
</fields>
<uniqueKey>name</uniqueKey>
</schema>

从Datastax下载solrconfig.xml时的样子(未进行任何更改)。

然后,我继续运行以下行:$ cd into / directory

$ curl http:// localhost:8983 / solr / resource / stacko.test1 / solrconfig.xml --data-binary @ solrconfig.xml -H'内容类型:文本/ xml; 字符集= UTF-8'

$ curl http:// localhost:8983 / solr / resource / stacko.test1 / schema.xml --data-binary @ schema.xml -H'内容类型:文本/ xml; 字符集= UTF-8'

$ curl“ http:// localhost:8983 / solr / admin / cores?action = CREATE&name = stacko.test1

但是,当我打开Solr Admin门户并转到“ Core Admin”页面时,看到以下内容:

Solr Admin的图像

我无法执行任何查询,因为显然没有数据可查询...为什么会发生这种情况? 我还没弄清楚。 如果您需要更多信息,请告诉我。

您需要告诉DSE将内容重新索引到Solr中,在文档中查找详细信息,但通常是这样的:

curl "http://localhost:8983/solr/admin/cores?action=RELOAD&name=stacko.test1&reindex=true&deleteAll=true"

暂无
暂无

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

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