Solr Cookbook学习记录 - Facet学习

来源:互联网 发布:查看linux网络地址 编辑:程序博客网 时间:2024/05/22 06:54
facet查询语句格式:f.<FieldName>.<FacetParam>=<value>f.xxx.xxx=xxxfacet.limit=10facet.category.facet.limit=5可以覆盖上面定义的10条记录----------------------------------------------------------------------------------------------------------------------------Facet参数http://172.16.1.79:8983/solr/core0/select?q=牛奶&facet=true&facet.query=牛奶&facet.field=cname3&facet.mincount=1facet.fieldfacet.prefixfacet.sort      默认按数量排序facet.limitfacet.offsetfacet.mincountfacet.method    取值为enum或fc,默认为fc,表示两种Facet算法。facet.missing   默认为"",如果设置为true或on,将统计Facet字段值为null的记录。facet.enum.cache.minDf  Date Facet 时间段分组facet.datefacet.date.start    2013-01-01T00:00:00Zfacet.date.end      2013-12-31T23:59:59Zfacet.date.gap      时间间隔,设置为+1MONTH表示间隔1个月,分成12个间隔短。facet.date.hardend  start:2012-1-1, end:2012-12-20, gap为1年, 设置为true,结束日期为2013-1-1,设置为false,结束日期为2012-12-20。facet.date.otherfacet.date.include举例:&facet=on&facet.date=date&facet.date.start=2009-1-1T0:0:0Z&facet.date.end=2010-1-1T0:0:0Z&facet.date.gap=%2B1MONTH&facet.date.other=all----------------------------------------------------------------------------------------------------------------------------Facet by Rangefacet.rangefacet.range.startfacet.range.endfacet.range.gapfacet.range.hardendfacet.range.otherfacet.range.include----------------------------------------------------------------------------------------------------------------------------echoHandler参数qt      默认的SolrRequestHandler是/selectwt      writer type,默认是xmlNOWTZ----------------------------------------------------------------------------------------------------------------------------q       sort        默认score desc,多个排序以逗号分隔(inStock desc, price asc)start       默认0rows        默认10fq          Filter Query,fq=price:[10 TO *]&fq=stock:0 等于 fq=+price[10 TO *] +stock:0fl          默认*,空格或逗号分隔。id name,price id,name,pricetimeAllowed----------------------------------------------------------------------------------------------------------------------------Transformers参数[docid]     the lucene document id(int)[shard]     the id of the shard that produced the result[explain]   inline explain info[explain style=nl|text|html]    explain info with explicit style[value v=? t=int|double|float|date] explicit value----------------------------------------------------------------------------------------------------------------------------Field别名id,price:crazy_price_field  返回crazy_price_field,按price值显示。id,price:sum(a,b)           返回price,按a+b显示。fl=my_alias:field_name      return field_name but display it as my_alias----------------------------------------------------------------------------------------------------------------------------

0 0
原创粉丝点击