加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

solr schema.xml配置文件的理解

发布时间:2020-12-16 05:15:58 所属栏目:百科 来源:网络整理
导读:schema.xml中的 语句的理解 field name="propertyvalues" type="string" indexed="true" stored="true" multiValued="true"/ 1.只有index=true 的字段才能做facet.field的字段, 同时只有index=true该字段才能当做搜索的内容 当然store=true或者false没关系

schema.xml中的 语句的理解

<field name="propertyvalues" type="string" indexed="true" stored="true" multiValued="true"/>

1.只有index=true 的字段才能做facet.field的字段,同时只有index=true该字段才能当做搜索的内容 当然store=true或者false没关系

  • 将不需要被用于搜索的,而只是作为结果返回的field的indexed设置为false

2.store=true的好处是,从页面获取的json数据,如果该字段设置store=true则可以通过json获取该字段 同时才会在solr界面上显示

3.multiValued="true"的理解

先看如下图片 假如我进行语句:select value ‘propertyvalues’ from 下表 where productId=1

得出的结果有 52以下 、 冰糯种 、 白色 、 手镯


这样value 有多个值, 我们需要将字段propertyvalues 设置成multiValued="true" 如下图显示



如果没有设置multiValued="true" 则只会显示第一个值,即显示一个

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读