Class SolrFacetConfig
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.repo.search.impl.solr.facet.SolrFacetConfig
-
- All Implemented Interfaces:
java.util.EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class SolrFacetConfig extends org.springframework.extensions.surf.util.AbstractLifecycleBeanThis class picks up all the loaded properties passed to it and uses a naming convention to isolate the default and custom facets and related values. So, if a new facet filter_abc is required for the cm:content.mimetype, then the following needs to be put into a properties file. The search for the additional custom properties file is tomcat/shared/classes/alfresco/extension/solr-facets-config-custom.properties:- custom.cm\:content.mimetype.filterID=filter_abc
- custom.cm\:content.mimetype.displayName=faceted-search.facet-menu.facet.formats
- custom.cm\:content.mimetype.displayControl=alfresco/search/FacetFilters
- custom.cm\:content.mimetype.maxFilters=5
- custom.cm\:content.mimetype.hitThreshold=1
- custom.cm\:content.mimetype.minFilterValueLength=4
- custom.cm\:content.mimetype.sortBy=DESCENDING
- custom.cm\:content.mimetype.scope=SCOPED_SITES
- custom.cm\:content.mimetype.scopedSites=site1,site2,site3
- custom.cm\:content.mimetype.isEnabled=true
- custom.cm\:content.mimetype.EXTRA-PROP.blockIncludeFacetRequest=true
- custom.cm\:content.mimetype.EXTRA-PROP.moreProp=additionalInfo
${solr_facets.inheritanceHierarchy}
The default inheritance orders are:
solr_facets.inheritanceHierarchy=default,custom i.e. the default facet's values are retrieved first and then overlayed with values from the custom facet.- Author:
- Jamal Kaabi-Mofrad
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSolrFacetConfig.ConfigHelperstatic classSolrFacetConfig.ValueName
-
Constructor Summary
Constructors Constructor Description SolrFacetConfig(java.util.Properties rawProperties, java.lang.String inheritanceOrder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,SolrFacetProperties>getDefaultFacets()protected voidonBootstrap(org.springframework.context.ApplicationEvent event)protected voidonShutdown(org.springframework.context.ApplicationEvent event)voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
-
-
-
Method Detail
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
- Parameters:
namespaceService- the namespaceService to set
-
getDefaultFacets
public java.util.Map<java.lang.String,SolrFacetProperties> getDefaultFacets()
-
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
- Specified by:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event)
- Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
-