尝试使用
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
字段的文档?