Package org.opencms.jsp.search.config
Class CmsSearchConfigurationFacetField
java.lang.Object
org.opencms.jsp.search.config.CmsSearchConfigurationFacet
org.opencms.jsp.search.config.CmsSearchConfigurationFacetField
- All Implemented Interfaces:
I_CmsSearchConfigurationFacet
,I_CmsSearchConfigurationFacetField
public class CmsSearchConfigurationFacetField
extends CmsSearchConfigurationFacet
implements I_CmsSearchConfigurationFacetField
Search configuration special for field facets. Extends @see{org.opencms.jsp.search.config.CmsSearchConfigurationFacet}.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencms.jsp.search.config.I_CmsSearchConfigurationFacet
I_CmsSearchConfigurationFacet.SortOrder
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The index field to use for the facet.protected String
A modifier for filter queries.protected Integer
The maximal number of entries shown in a facet.protected String
A prefix, all entries of a facet must start with.protected I_CmsSearchConfigurationFacet.SortOrder
The sorting of facet entries.Fields inherited from class org.opencms.jsp.search.config.CmsSearchConfigurationFacet
m_explicitExcludeTags, m_ignoreFacetFilters, m_ignoreTags, m_isAndFacet, m_label, m_minCount, m_name, m_preselection
-
Constructor Summary
ConstructorDescriptionCmsSearchConfigurationFacetField
(String field, String name, Integer minCount, Integer limit, String prefix, String label, I_CmsSearchConfigurationFacet.SortOrder order, String filterQueryModifier, Boolean isAndFacet, List<String> preselection, Boolean ignoreFiltersFromAllFacets, Collection<String> excludeTags) Constructor directly setting all configuration values. -
Method Summary
Modifier and TypeMethodDescriptiongetField()
Returns the index field that is used for the facet.getLimit()
Returns the maximal number of entries that should be shown in the facet.Returns the prefix all entries of a facet must match.Returns the sort order that should be used for the facet entries (either "count" or "index").modifyFilterQuery
(String facetValue) Returns the (modified) filter query that should be send as filter query when a facet entry is checked.Methods inherited from class org.opencms.jsp.search.config.CmsSearchConfigurationFacet
getIgnoreAllFacetFilters, getIgnoreMaxParamKey, getIgnoreTags, getIsAndFacet, getLabel, getMinCount, getName, getParamKey, getPreSelection, propagateAllFacetNames
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opencms.jsp.search.config.I_CmsSearchConfigurationFacet
getIgnoreAllFacetFilters, getIgnoreMaxParamKey, getIgnoreTags, getIsAndFacet, getLabel, getMinCount, getName, getParamKey, getPreSelection, propagateAllFacetNames
-
Field Details
-
m_prefix
A prefix, all entries of a facet must start with. -
m_field
The index field to use for the facet. -
m_limit
The maximal number of entries shown in a facet. -
m_sort
The sorting of facet entries. -
m_fiterQueryModifier
A modifier for filter queries.
-
-
Constructor Details
-
CmsSearchConfigurationFacetField
public CmsSearchConfigurationFacetField(String field, String name, Integer minCount, Integer limit, String prefix, String label, I_CmsSearchConfigurationFacet.SortOrder order, String filterQueryModifier, Boolean isAndFacet, List<String> preselection, Boolean ignoreFiltersFromAllFacets, Collection<String> excludeTags) Constructor directly setting all configuration values.- Parameters:
field
- The index field to use for the facet.name
- The name of the facet. Ifnull
it defaults to the name of the index field.minCount
- The minimal number of hits that is necessary to add a term to the facet.limit
- The maximal number of facet entries.prefix
- A prefix all entries of a facet must have.label
- The label that can be shown over the facet entries in your search form.order
- The sorting of the facet entries (either "count", which is default, or "index", which causes alphabetical sorting).filterQueryModifier
- Modifier for the filter queries when a facet entry is checked. Can contain "%(value)" - what is replaced by the facet entry's value.isAndFacet
- If set to true, the facets filters for results containing all checked entries. Otherwise it filters for results containing at least one checked entry.preselection
- The list of facet items that should be preselected for the first search.ignoreFiltersFromAllFacets
- A flag, indicating if filters from all facets should be ignored or not.excludeTags
- The tags (keys) of (filter) queries to be not taken into account for the facet. If "ignoreFiltersFromFacets" is true, the according tags for facets and queries will be added.
-
-
Method Details
-
getField
Description copied from interface:I_CmsSearchConfigurationFacetField
Returns the index field that is used for the facet.- Specified by:
getField
in interfaceI_CmsSearchConfigurationFacetField
- Returns:
- The index field that is used for the facet.
- See Also:
-
getLimit
Description copied from interface:I_CmsSearchConfigurationFacetField
Returns the maximal number of entries that should be shown in the facet.- Specified by:
getLimit
in interfaceI_CmsSearchConfigurationFacetField
- Returns:
- The maximal number of entries that should be shown in the facet. (Solr: facet.limit)
- See Also:
-
getPrefix
Description copied from interface:I_CmsSearchConfigurationFacetField
Returns the prefix all entries of a facet must match.- Specified by:
getPrefix
in interfaceI_CmsSearchConfigurationFacetField
- Returns:
- The prefix all entries of a facet must match. (Solr: facet.prefix)
- See Also:
-
getSortOrder
Description copied from interface:I_CmsSearchConfigurationFacetField
Returns the sort order that should be used for the facet entries (either "count" or "index").- Specified by:
getSortOrder
in interfaceI_CmsSearchConfigurationFacetField
- Returns:
- The sort order that should be used for the facet entries (either "count" or "index"). (Solr: facet.sort)
- See Also:
-
modifyFilterQuery
Description copied from interface:I_CmsSearchConfigurationFacetField
Returns the (modified) filter query that should be send as filter query when a facet entry is checked.- Specified by:
modifyFilterQuery
in interfaceI_CmsSearchConfigurationFacetField
- Parameters:
facetValue
- The modifier that should be applied the each filter query appended when checking a facet entry. The modifier can contain the macro "%(value)" that is substituted by the facet entry's value. If the modifier isnull
, the unmodified filter query is returned.- Returns:
- The filter query's value.
- See Also:
-