Package org.opencms.jsp.search.config
Class CmsSearchConfigurationFacet
java.lang.Object
org.opencms.jsp.search.config.CmsSearchConfigurationFacet
- All Implemented Interfaces:
I_CmsSearchConfigurationFacet
- Direct Known Subclasses:
CmsSearchConfigurationFacetField
,CmsSearchConfigurationFacetQuery
,CmsSearchConfigurationFacetRange
Configuration that is common for all facets. Used as base class for special facet configurations, e.g. for the field facet configuration.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencms.jsp.search.config.I_CmsSearchConfigurationFacet
I_CmsSearchConfigurationFacet.SortOrder
-
Field Summary
Modifier and TypeFieldDescriptionTags of filter-queries that should not be applied to the facet, explicitly configured.protected boolean
A flag, indicating if checked entries from other facets should influence the facet or not.Tags of filter-queries that should not be applied to the facet.protected boolean
A flag, indicating if facet filter queries should be concatenated by AND.protected String
A label that can be displayed in the form, e.g., at top of the facet.protected Integer
The minimal number of hits required to add an entry to a facet.protected String
A name used to identify the facet when showing it in the search form.The sorting of facet entries. -
Constructor Summary
ConstructorDescriptionCmsSearchConfigurationFacet
(Integer minCount, String label, String name, Boolean isAndFacet, List<String> preselection, Boolean ignoreFiltersFromFacets, Collection<String> excludeTags) The constructor setting all configuration options. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the filters of all facets are not applied when calculating the facet items.Returns the facet specific request parameter used to send the information if the maximum number of facet entries should be ignored.Returns the tags of other facets, for which the filters from this facet should be ignored.boolean
Returns true if the facet filters, such that only documents with all checked facet entries appear, otherwise false.getLabel()
Returns the label that is intended to be displayed over the facet's entries.Returns the minimal number of hits necessary to show a facet entry.getName()
Returns the name used to identify the facet.Returns the facet specific request parameter used to send the checked facet entries.A list of facet-entries that should be preselected, if the search form is rendered the first time.void
propagateAllFacetNames
(Collection<String> names) Propagate the names of the other facets that are configured.
-
Field Details
-
m_minCount
The minimal number of hits required to add an entry to a facet. -
m_name
A name used to identify the facet when showing it in the search form. -
m_label
A label that can be displayed in the form, e.g., at top of the facet. -
m_preselection
The sorting of facet entries. -
m_isAndFacet
A flag, indicating if facet filter queries should be concatenated by AND. -
m_ignoreFacetFilters
A flag, indicating if checked entries from other facets should influence the facet or not. -
m_ignoreTags
Tags of filter-queries that should not be applied to the facet. -
m_explicitExcludeTags
Tags of filter-queries that should not be applied to the facet, explicitly configured.
-
-
Constructor Details
-
CmsSearchConfigurationFacet
public CmsSearchConfigurationFacet(Integer minCount, String label, String name, Boolean isAndFacet, List<String> preselection, Boolean ignoreFiltersFromFacets, Collection<String> excludeTags) The constructor setting all configuration options.- Parameters:
minCount
- The minimal number of hits required to add an entry to a facet.label
- A label that can be displayed in the form, e.g., at top of the facet.name
- An optional name for the facetisAndFacet
- 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
- A list with entries that should be preselected in the facet, when the search page is called the first time.ignoreFiltersFromFacets
- A flag, indicating if filters from other 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
-
getIgnoreAllFacetFilters
Description copied from interface:I_CmsSearchConfigurationFacet
Returns true if the filters of all facets are not applied when calculating the facet items. Otherwise returns false.- Specified by:
getIgnoreAllFacetFilters
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- A flag, indicating if the filters of facet's should be ignored or not.
- See Also:
-
getIgnoreMaxParamKey
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the facet specific request parameter used to send the information if the maximum number of facet entries should be ignored.- Specified by:
getIgnoreMaxParamKey
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The facet specific request parameter used to send the information if the maximum number of facet entries should be ignored.
- See Also:
-
getIgnoreTags
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the tags of other facets, for which the filters from this facet should be ignored.- Specified by:
getIgnoreTags
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- the tags of other facets, for which the filters from this facet should be ignored.
- See Also:
-
getIsAndFacet
Description copied from interface:I_CmsSearchConfigurationFacet
Returns true if the facet filters, such that only documents with all checked facet entries appear, otherwise false.- Specified by:
getIsAndFacet
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- A flag, indicating if the facet's filters are concatenated by AND (or OR).
- See Also:
-
getLabel
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the label that is intended to be displayed over the facet's entries.- Specified by:
getLabel
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The label that is intended to be displayed over the facet's entries.
- See Also:
-
getMinCount
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the minimal number of hits necessary to show a facet entry.- Specified by:
getMinCount
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The minimal number of hits necessary to show a facet entry. (Solr: facet.mincount)
- See Also:
-
getName
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the name used to identify the facet.- Specified by:
getName
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The name used to identify the facet.
- See Also:
-
getParamKey
Description copied from interface:I_CmsSearchConfigurationFacet
Returns the facet specific request parameter used to send the checked facet entries.- Specified by:
getParamKey
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The facet specific request parameter used to send the checked facet entries.
- See Also:
-
getPreSelection
Description copied from interface:I_CmsSearchConfigurationFacet
A list of facet-entries that should be preselected, if the search form is rendered the first time.- Specified by:
getPreSelection
in interfaceI_CmsSearchConfigurationFacet
- Returns:
- The list of facet-entries that should be preselected, if the search form is rendered the first time.
- See Also:
-
propagateAllFacetNames
Description copied from interface:I_CmsSearchConfigurationFacet
Propagate the names of the other facets that are configured.- Specified by:
propagateAllFacetNames
in interfaceI_CmsSearchConfigurationFacet
- Parameters:
names
- the names of the other facets- See Also:
-