Package org.opencms.search.fields
Class CmsLuceneFieldConfiguration
- java.lang.Object
-
- org.opencms.search.fields.A_CmsSearchFieldConfiguration
-
- org.opencms.search.fields.CmsSearchFieldConfiguration
-
- org.opencms.search.fields.CmsLuceneFieldConfiguration
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<I_CmsSearchFieldConfiguration>
,I_CmsSearchFieldConfiguration
- Direct Known Subclasses:
CmsSearchFieldConfigurationOldCategories
public class CmsLuceneFieldConfiguration extends CmsSearchFieldConfiguration
Describes a configuration of fields that are used in building a search index.- Since:
- 7.0.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static CmsLuceneFieldConfiguration
DEFAULT_STANDARD
The default for the standard search configuration.static java.lang.String
STR_STANDARD_DESCRIPTION
The description for the standard field configuration.-
Fields inherited from class org.opencms.search.fields.CmsSearchFieldConfiguration
LAZY_FIELDS, STR_STANDARD
-
-
Constructor Summary
Constructors Constructor Description CmsLuceneFieldConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addField(CmsSearchField field)
Adds a field to this search field configuration.org.apache.lucene.analysis.Analyzer
getAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
Returns an analyzer that wraps the given base analyzer with the analyzers of this individual field configuration.java.util.List<java.lang.String>
getExcerptFieldNames()
Returns a list of all field names (Strings) that are used in generating the search excerpt.java.util.Set<java.lang.String>
getExcerptFields()
Returns the field names used for the excerpt generation.java.util.List<CmsLuceneField>
getLuceneFields()
Returns a list of the concrete Lucene search fields.java.util.Set<java.lang.String>
getReturnFields()
Returns the field names used for a regular result.-
Methods inherited from class org.opencms.search.fields.CmsSearchFieldConfiguration
addUninvertingMappings, appendAdditionalValuesToDcoument, appendCategories, appendContentBlob, appendDates, appendFieldMapping, appendFieldMappings, appendFileSize, appendLocales, appendPath, appendProperties, appendType, createDocument, getIndex, getLocaleExtendedName, getLocaleExtendedName, getParentFolderTokens, setIndex
-
Methods inherited from class org.opencms.search.fields.A_CmsSearchFieldConfiguration
compareTo, equals, getDescription, getField, getFieldNames, getFields, getName, hashCode, init, setDescription, setName
-
-
-
-
Field Detail
-
DEFAULT_STANDARD
public static final CmsLuceneFieldConfiguration DEFAULT_STANDARD
The default for the standard search configuration.This defines the default that is used in case no "standard" field configuration is defined in
opencms-search.xml
.
-
STR_STANDARD_DESCRIPTION
public static final java.lang.String STR_STANDARD_DESCRIPTION
The description for the standard field configuration.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsLuceneFieldConfiguration
public CmsLuceneFieldConfiguration()
-
-
Method Detail
-
addField
public void addField(CmsSearchField field)
Description copied from class:A_CmsSearchFieldConfiguration
Adds a field to this search field configuration.- Specified by:
addField
in interfaceI_CmsSearchFieldConfiguration
- Overrides:
addField
in classA_CmsSearchFieldConfiguration
- Parameters:
field
- the field to add- See Also:
A_CmsSearchFieldConfiguration.addField(org.opencms.search.fields.CmsSearchField)
-
getAnalyzer
public org.apache.lucene.analysis.Analyzer getAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
Returns an analyzer that wraps the given base analyzer with the analyzers of this individual field configuration.- Parameters:
analyzer
- the base analyzer to wrap- Returns:
- an analyzer that wraps the given base analyzer with the analyzers of this individual field configuration
-
getExcerptFieldNames
public java.util.List<java.lang.String> getExcerptFieldNames()
Returns a list of all field names (Strings) that are used in generating the search excerpt.- Returns:
- a list of all field names (Strings) that are used in generating the search excerpt
-
getExcerptFields
public java.util.Set<java.lang.String> getExcerptFields()
Returns the field names used for the excerpt generation.- Returns:
- the field names used for the excerpt generation
-
getLuceneFields
public java.util.List<CmsLuceneField> getLuceneFields()
Returns a list of the concrete Lucene search fields.- Returns:
- a list of lucene search fields
-
getReturnFields
public java.util.Set<java.lang.String> getReturnFields()
Returns the field names used for a regular result.- Returns:
- the field names used for a regular result
-
-