solr笔记

“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]

你可能感兴趣的:(Solr,facet)