[size=large]“Pretty” facet.field Terms[/size]
§ 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="
&
"
/>
<filter
class="solr.TrimFilterFactory"
/>
<filter
class="solr.CapitalizaConFilterFactory"
onlyFirstWord="false"
/>
[size=large] “Pretty” facet.field Results[/size]
{“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]
§ 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="
&
"
/>
<filter
class="solr.TrimFilterFactory"
/>
<filter
class="solr.CapitalizaConFilterFactory"
onlyFirstWord="false"
/>
[size=large] “Pretty” facet.field Results[/size]
{“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]