我正在使用solr 6.3进行一些练习。
我正在使用文档上的文档部分
<doc>
<field name="id">a</field>
<field name="stuff">Adobe Acrobat Readef</field>
</doc>
在终端上也带有curl
curl "http://localhost:8983/solr/tt/update/extract?literal.id=t&uprefix=attr_&fmap.content=stuff&commit=true" -F "myfile=@a.pdf"
通过这样做,我正在使用架构上的" suppit"字段映射" supper"字段,称为" z_field"。
<fieldType name="z_field" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<field name="stuff" type="z_field"/>
,尽管我在带有随机短语的Solr UI的分析部分上成功。当我使用两个命令更新时
所以,我错过了什么。因为我正在为文本定义字段和fieldType。
谢谢。
来自文档
字段值与索引项
分析仪的输出影响给定字段中索引的术语 (以及针对这些领域解析查询时使用的术语) 对字段的存储值没有影响。例如: 分析仪可能会将"棕牛"分为两个索引术语"棕色"和 "牛",但存储的值仍然是一个字符串:"棕色牛"