完整错误:
Error CREATEing SolrCore 'product_v2': Unable to create core [product_v2] Caused by: _version_ field must exist in schema and be searchable (indexed or docValues) and retrievable(stored or docValues) and not multiValued (_version_ is multiValued
Schema.xml的
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="product_v2" version="1.5">
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/>
<!-- points to the root document of a block of nested documents. Required for nested
document support, may be removed otherwise
-->
<field name="_root_" type="string" indexed="true" stored="false"/>
<!-- Only remove the "id" field if you have a very good reason to. While not strictly
required, it is highly recommended. A <uniqueKey> is present in almost all Solr
installations. See the <uniqueKey> declaration below where <uniqueKey> is set to "id".
-->
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="sku" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="title" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="type" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<!-- Field to use to determine and enforce document uniqueness.
Unless this field is marked with required="false", it will be a required field
-->
<uniqueKey>id</uniqueKey>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" />
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
</schema>
不幸的是我不知道该怎么做。据我所知,版本符合所有要求。我过去曾经使用过相当数量的solr而没有问题,但这是我第一次使用solrcloud + zookeeper。
Solr版本为6.3.0
感谢您提供的任何帮助
答案 0 :(得分:0)
好吧......所以我没有确切的答案,但我确实已经解决了这个问题所以我想我会提供有关我所做的事情的信息以便让事情发挥作用。
1)我决定让这个例子工作,然后剥离功能
2)我没有为集合核心创建solr文件夹,并为文件分配了正确的所有权(对我来说,它位于/usr/local/solr/server/solr)...我认为没有core.properties文件搞砸了。
3)上传到zookeeper后我没有从solr目录中删除配置文件(不要认为这很重要,但要注意)
4)我没有重新启动solr,我只是使用API重新加载