上一篇已经介绍了solr怎么去搭建,今天说下solr中的Field和FieldType
1.什么是Field
在我认为,Field就相当于数据库中的字段,而FieldType就是数据库中列的类型了,我不喜欢把他叫我索引,我感觉索引总是不怎么好去理解。
2.Field的配置
2.1 普通的Field
Field是在我们所配置的solrhome的collection1\conf\schema.xml中,
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="sku" type="text_en_splitting_tight" indexed="true" stored="true" omitNorms="true"/>
这就是系统自带的Field
其中name就是Field的名字