当我尝试索引具有text_general
字段的文档时,出现以下错误:
Exception writing document id 93cf6aeb-54b0-471a-9325-5b8e95801131 to the index; possible analysis error: cannot change field "content" from index options=DOCS to inconsistent index options=DOCS_AND_FREQS_AND_POSITIONS
我尝试索引的文档如下所示:
{
"filename": "FooBar.pdf",
"content": "my test"
}
此字段的架构定义为:
<field name="content" type="text_general" uninvertible="true" indexed="true" required="true" stored="true"/>
其中字段类型定义为:
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="true">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.SynonymGraphFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
如何成功地为具有text_general
字段的文档编制索引?
1条答案
按热度按时间5ktev3wc1#
这是由于已存在为使用其他字段类型编制索引的字段编制索引的内容。请删除该索引并重新为内容编制索引。