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
Fields Modifier and Type Field Description protected java.lang.String
m_field
The index field to use for the facet.protected java.lang.String
m_fiterQueryModifier
A modifier for filter queries.protected java.lang.Integer
m_limit
The maximal number of entries shown in a facet.protected java.lang.String
m_prefix
A prefix, all entries of a facet must start with.protected I_CmsSearchConfigurationFacet.SortOrder
m_sort
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
Constructors Constructor Description CmsSearchConfigurationFacetField(java.lang.String field, java.lang.String name, java.lang.Integer minCount, java.lang.Integer limit, java.lang.String prefix, java.lang.String label, I_CmsSearchConfigurationFacet.SortOrder order, java.lang.String filterQueryModifier, java.lang.Boolean isAndFacet, java.util.List<java.lang.String> preselection, java.lang.Boolean ignoreFiltersFromAllFacets, java.util.Collection<java.lang.String> excludeTags)
Constructor directly setting all configuration values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getField()
Returns the index field that is used for the facet.java.lang.Integer
getLimit()
Returns the maximal number of entries that should be shown in the facet.java.lang.String
getPrefix()
Returns the prefix all entries of a facet must match.I_CmsSearchConfigurationFacet.SortOrder
getSortOrder()
Returns the sort order that should be used for the facet entries (either "count" or "index").java.lang.String
modifyFilterQuery(java.lang.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 Detail
-
m_prefix
protected java.lang.String m_prefix
A prefix, all entries of a facet must start with.
-
m_field
protected java.lang.String m_field
The index field to use for the facet.
-
m_limit
protected java.lang.Integer m_limit
The maximal number of entries shown in a facet.
-
m_sort
protected I_CmsSearchConfigurationFacet.SortOrder m_sort
The sorting of facet entries.
-
m_fiterQueryModifier
protected java.lang.String m_fiterQueryModifier
A modifier for filter queries.
-
-
Constructor Detail
-
CmsSearchConfigurationFacetField
public CmsSearchConfigurationFacetField(java.lang.String field, java.lang.String name, java.lang.Integer minCount, java.lang.Integer limit, java.lang.String prefix, java.lang.String label, I_CmsSearchConfigurationFacet.SortOrder order, java.lang.String filterQueryModifier, java.lang.Boolean isAndFacet, java.util.List<java.lang.String> preselection, java.lang.Boolean ignoreFiltersFromAllFacets, java.util.Collection<java.lang.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 Detail
-
getField
public java.lang.String 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:
I_CmsSearchConfigurationFacetField.getField()
-
getLimit
public java.lang.Integer 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:
I_CmsSearchConfigurationFacetField.getLimit()
-
getPrefix
public java.lang.String 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:
I_CmsSearchConfigurationFacetField.getPrefix()
-
getSortOrder
public I_CmsSearchConfigurationFacet.SortOrder 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:
I_CmsSearchConfigurationFacetField.getSortOrder()
-
modifyFilterQuery
public java.lang.String modifyFilterQuery(java.lang.String facetValue)
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:
I_CmsSearchConfigurationFacetField.modifyFilterQuery(java.lang.String)
-
-