Numdocs 在 Solr Admin 中显示为 0

Numdocs appearing as 0 in Solr Admin

我一直在尝试将 Solr 与 Cassandra 和 运行 设置为一个问题。我一直在学习本教程: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};) 和 table (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>

solrconfig.xml 看起来像从 Datastax 下载时的样子(未对其进行任何更改)。

然后我继续 运行 这些行: $ cd into/directory

$ curl http://localhost:8983/solr/resource/stacko.test1/solrconfig.xml --data-binary @solrconfig.xml -H 'Content-type:text/xml; charset=utf-8'

$ curl http://localhost:8983/solr/resource/stacko.test1/schema.xml --data-binary @schema.xml -H 'Content-type:text/xml; charset=utf-8'

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

但是,当我打开 Solr 管理门户并转到我的核心管理页面时,我看到了:

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

您需要告诉 DSE 将内容重新索引到 Solr 中,查看 doc 了解详细信息,但通常是这样的:

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