Package org.opencms.search.fields
Class A_CmsSearchFieldConfiguration
java.lang.Object
org.opencms.search.fields.A_CmsSearchFieldConfiguration
- All Implemented Interfaces:
Serializable
,Comparable<I_CmsSearchFieldConfiguration>
,I_CmsSearchFieldConfiguration
- Direct Known Subclasses:
CmsSearchFieldConfiguration
public abstract class A_CmsSearchFieldConfiguration
extends Object
implements I_CmsSearchFieldConfiguration
Base class for a typical field configuration. Basically handles name and description
and provides defaults for interface methods typically not of interest for most implementations.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addField
(CmsSearchField field) Adds a field to this search field configuration.void
addUninvertingMappings
(Map<String, org.apache.solr.uninverting.UninvertingReader.Type> uninvertingMap) To allow sorting on a field (without docvalues) the field must be added to the map given toUninvertingReader.wrap(org.apache.lucene.index.DirectoryReader, Map)
.int
boolean
Returns the description of this field configuration.Returns the configuredCmsSearchField
instance with the given name.Returns the list of configured field names (Strings).Returns the list of configuredCmsSearchField
instances.getName()
Returns the name of this field configuration.int
hashCode()
void
init()
Initializes this field configuration.void
setDescription
(String description) Sets the description of this field configuration.void
Sets the name of this field configuration.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opencms.search.fields.I_CmsSearchFieldConfiguration
createDocument
-
Constructor Details
-
A_CmsSearchFieldConfiguration
public A_CmsSearchFieldConfiguration()Creates a new empty field configuration.
-
-
Method Details
-
addField
Adds a field to this search field configuration.- Specified by:
addField
in interfaceI_CmsSearchFieldConfiguration
- Parameters:
field
- the field to add
-
addUninvertingMappings
public void addUninvertingMappings(Map<String, org.apache.solr.uninverting.UninvertingReader.Type> uninvertingMap) Description copied from interface:I_CmsSearchFieldConfiguration
To allow sorting on a field (without docvalues) the field must be added to the map given toUninvertingReader.wrap(org.apache.lucene.index.DirectoryReader, Map)
. The method adds the configured fields.- Specified by:
addUninvertingMappings
in interfaceI_CmsSearchFieldConfiguration
- Parameters:
uninvertingMap
- the map to which the fields are added.- See Also:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<I_CmsSearchFieldConfiguration>
- See Also:
-
equals
-
getDescription
Description copied from interface:I_CmsSearchFieldConfiguration
Returns the description of this field configuration.- Specified by:
getDescription
in interfaceI_CmsSearchFieldConfiguration
- Returns:
- the description of this field configuration
- See Also:
-
getField
Returns the configuredCmsSearchField
instance with the given name.- Parameters:
name
- the search field name to look up- Returns:
- the configured
CmsSearchField
instance with the given name
-
getFieldNames
Returns the list of configured field names (Strings).- Returns:
- the list of configured field names (Strings)
-
getFields
Returns the list of configuredCmsSearchField
instances.- Specified by:
getFields
in interfaceI_CmsSearchFieldConfiguration
- Returns:
- the list of configured
CmsSearchField
instances
-
getName
Description copied from interface:I_CmsSearchFieldConfiguration
Returns the name of this field configuration.- Specified by:
getName
in interfaceI_CmsSearchFieldConfiguration
- Returns:
- the name of this field configuration
- See Also:
-
hashCode
-
init
Description copied from interface:I_CmsSearchFieldConfiguration
Initializes this field configuration.- Specified by:
init
in interfaceI_CmsSearchFieldConfiguration
- See Also:
-
setDescription
Description copied from interface:I_CmsSearchFieldConfiguration
Sets the description of this field configuration.- Specified by:
setDescription
in interfaceI_CmsSearchFieldConfiguration
- Parameters:
description
- the description to set- See Also:
-
setName
Description copied from interface:I_CmsSearchFieldConfiguration
Sets the name of this field configuration.- Specified by:
setName
in interfaceI_CmsSearchFieldConfiguration
- Parameters:
name
- the name to set- See Also:
-