solr混合字段查询配置

1、位置:collection1/conf/schema.xml

2、配置字段

 <!--field end -->
   <field name="boTitle" type="textComplex" indexed="true" stored="true"/>
   <field name="boContent" type="textComplex" indexed="true" stored="true"/>
   <field name="boEmail" type="textComplex" indexed="true" stored="true"/>
   <field name="boSearch" type="textComplex" indexed="true" stored="false" multiValued="true"/>
   <!--field beign-->

3、配置混合字段

 <!--boSearch begin-->
   <copyField source="boTitle" dest="boSearch"/> 
   <copyField source="boContent" dest="boSearch"/>
   <copyField source="boEmail" dest="boSearch"/>
   <!--boSearch end-->
注:这样查询boSearch的字段时候相当于查询的是boTitle、boContent、boEmail三个字段的索引。

猜你喜欢

转载自blog.csdn.net/hechaojie_com/article/details/82731491
今日推荐