看图solr 返回的json数据

json为solr 返回的json数据

以下代码都是在js中操作

a. var property1Value =json.facet_counts.facet_fields["property1"]; 这里传入的是字符串property1 因而要用双引号,也可以传入property1property2property3property4property5 和type 这个6个都是facet.field 字段

b. var property1Value =json.facet_counts.facet_fields.property1; 这里的property1是对象不再是字符串

a和b两种方式等价

var property1Value 的值 为 solr 返回的json数据


solr 返回的json数据solr 返回的json数据


facet.field=price 也会统计 facet字段按照 price 有多少个
facet.query=price:[100000 TO *] 统计加个在10万以上的多少个 其中price 为facet字段

facet.field 理解facet.field=cat 统计doc中包含cat字段的doc有多少个

solr 返回的json数据








相关文章:

  • 2021-05-04
  • 2021-09-10
  • 2021-07-22
  • 2021-11-05
  • 2021-11-05
  • 2021-11-05
  • 2021-11-05
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2021-11-15
  • 2022-02-17
  • 2022-12-23
  • 2021-09-29
  • 2021-09-29
相关资源
相似解决方案