欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

solr笔记 博客分类: solr facetsolr 

程序员文章站 2024-03-18 20:29:28
...
“Pretty” facet.field Terms
§  Field Faceting uses Indexed Terms
§  Leverage copyField and TokenFilters that will
give you good looking Constraints
<tokenizer
  class="solr.PaPernTokenizerFactory"
  paPern="(,|;)\s*"
  />
 
<filter
  class="solr.PaPernReplaceFilterFactory"
  paPern="\s+"
  replacement="
  "
  />
 
<filter
  class="solr.PaPernReplaceFilterFactory"
  paPern="
  and
  "
  replacement="
  &amp;
  "
  />
 
<filter
  class="solr.TrimFilterFactory"
  />
 
<filter
  class="solr.CapitalizaConFilterFactory"
  onlyFirstWord="false"
  />

“Pretty” facet.field Results
{“id” : “MyExampleDoc”,!
"category” : ” books !
and magazines; !
computers, “!
}!
copyField
in schema
<copyField “source”=“category” “dest”=“category_pretty”/>
"facet_counts":{!
"facet_fields":{!
"category_pretty":[!
"Books & Magazines",1,!
"Computers",1]

相关标签: facet solr