Package org.opencms.search.fields
Class CmsSearchField
- java.lang.Object
-
- org.opencms.search.fields.CmsSearchField
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
CmsLuceneField
,CmsSolrField
public class CmsSearchField extends java.lang.Object implements java.io.Serializable
A abstract implementation for a search field.- Since:
- 8.5.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FIELD_ADDITIONAL_INFO
Name of the field that contains the gallery index additional information.static java.lang.String
FIELD_CATEGORY
Name of the field that contains the (optional) category of the document (hardcoded).static java.lang.String
FIELD_CATEGORY_EXACT
static java.lang.String
FIELD_CONTAINER_TYPES
Name of the field that contains the gallery index container information.static java.lang.String
FIELD_CONTENT
Name of the field that usually contains the complete content of the document (optional).static java.lang.String
FIELD_CONTENT_BLOB
Name of the field that contains the complete extracted content of the document as serialized object (hardcoded).static java.lang.String
FIELD_CONTENT_LOCALES
Name of the field that contains the locale of the document.static java.lang.String
FIELD_DATE_CONTENT
Name of the field that contains the document content date (hardcoded).static java.lang.String
FIELD_DATE_CREATED
Name of the field that contains the document creation date (hardcoded).static java.lang.String
FIELD_DATE_CREATED_LOOKUP
Name of the field that contains the document creation date for fast lookup (hardcoded).static java.lang.String
FIELD_DATE_EXPIRED
The field name for the expiration date.static java.lang.String
FIELD_DATE_LASTMODIFIED
Name of the field that contains the document last modification date (hardcoded).static java.lang.String
FIELD_DATE_LASTMODIFIED_LOOKUP
Name of the field that contains the document last modification date for fast lookup (hardcoded).static java.lang.String
FIELD_DATE_LOOKUP_SUFFIX
The lookup suffix for date fields.static java.lang.String
FIELD_DATE_RELEASED
The field name for the release date.static java.lang.String
FIELD_DEPENDENCY_TYPE
The dependency type.static java.lang.String
FIELD_DESCRIPTION
Name of the field that usually contains the value of the "Description" property of the document (optional).static java.lang.String
FIELD_DISPORDER
The field PREFIX of the fields that contain the display order (without locale and postfix "_i").static java.lang.String
FIELD_DISPTITLE
The field PREFIX of the fields that contain the display title (without locale and postfix "_s").static java.lang.String
FIELD_DYNAMIC_EXACT
Name of the dynamic exact field.static java.lang.String
FIELD_DYNAMIC_PROPERTIES
Name of the dynamic property field (searched properties).static java.lang.String
FIELD_DYNAMIC_PROPERTIES_DIRECT
Name of the dynamic property field (non-searched properties).static java.lang.String
FIELD_EXCERPT
The name of the dynamic field that stores the shortened value of the content field in order to save performance.static java.lang.String
FIELD_FILENAME
Name of the field that contains the filename.static java.lang.String
FIELD_GEOCOORDS
Name of the field that contains Geo coordinates.static java.lang.String
FIELD_ID
Name of the field that contains the documents structure id.static java.lang.String
FIELD_INSTANCEDATE
The field PREFIX where the start date for the single entry of a serial date entry set is stored.static java.lang.String
FIELD_INSTANCEDATE_CURRENT_TILL
The field PREFIX where the date until which the single entry of a serial date entry should be treated as "current" is stored.static java.lang.String
FIELD_INSTANCEDATE_END
The field PREFIX where the end date for the single entry of a serial date entry set is stored.static java.lang.String
FIELD_INSTANCEDATE_RANGE
The field PREFIX where the start date and the end date of the single entry of a serial date entry is stored as a date range.static java.lang.String
FIELD_KEYWORDS
Name of the field that usually contains the value of the "Keywords" property of the document (optional).static java.lang.String
FIELD_LINK
The field name for the link.static java.lang.String
FIELD_META
Name of the field that usually combines all document "meta" information, that is the values of the "Title", "Keywords" and "Description" properties (optional).static java.lang.String
FIELD_MIMETYPE
Name of the field that contains the mime type.static java.lang.String
FIELD_PARENT_FOLDERS
Name of the field that contains all VFS parent folders of a document (hardcoded).static java.lang.String
FIELD_PATH
Name of the field that contains the document root path in the VFS (hardcoded).static java.lang.String
FIELD_PATH_HIERARCHY
static java.lang.String
FIELD_PLACE
static java.lang.String
FIELD_POSTFIX_DATE
The default (single-valued) date field postfix.static java.lang.String
FIELD_POSTFIX_DATE_RANGE
The default (single-valued) date range field postfix.static java.lang.String
FIELD_POSTFIX_DATE_RANGES
The default (multi-valued) date range field postfix.static java.lang.String
FIELD_POSTFIX_DATES
The default (multi-valued) dates field postfix.static java.lang.String
FIELD_POSTFIX_INT
The default int field postfix.static java.lang.String
FIELD_POSTFIX_LOC
The default local field postfix.static java.lang.String
FIELD_POSTFIX_SORT
The default field postfix for alpha-numeric sorting.static java.lang.String
FIELD_POSTFIX_STRING
The default string field postfix.static java.lang.String
FIELD_PREFIX_DEPENDENCY
The prefix used to store dependency fields.static java.lang.String
FIELD_PREFIX_DYNAMIC
The prefix for dynamic fields.static java.lang.String
FIELD_PREFIX_TEXT
The default text field prefix.static java.lang.String
FIELD_PRIORITY
Name of the field that contains the (optional) document priority, which can be used to boost the document in the result list (hardcoded).static java.lang.String
FIELD_RESOURCE_LOCALES
Name of the field that contains the resource locales of the document.static java.lang.String
FIELD_SCORE
The name of the score field.static java.lang.String
FIELD_SEARCH_CHANNEL
static java.lang.String
FIELD_SEARCH_EXCLUDE
Name of the field that contains the searched property value of 'search.exclude'.static java.lang.String
FIELD_SERIESDATES
The field where the dates for a serial date are stored.static java.lang.String
FIELD_SERIESDATES_CURRENT_TILL
The field where the dates until when the single serial dates are treated as "current" are stored.static java.lang.String
FIELD_SERIESDATES_END
The field where the end dates for a serial date are stored.static java.lang.String
FIELD_SERIESDATES_TYPE
The field where the type of the date series is stored.static java.lang.String
FIELD_SIZE
Name of the field that usually contains file size.static java.lang.String
FIELD_SOLR_ID
Name of the field that contains the unique Solr id.static java.lang.String
FIELD_SORT_TITLE
Name of the field that contains the lower-case title, untokenized, for sorting.static java.lang.String
FIELD_SPELL
static java.lang.String
FIELD_STATE
Name of the field that contains the resource state.static java.lang.String
FIELD_SUFFIX
Name of the field that contains the file name suffix of the resource.static java.lang.String
FIELD_TEXT
Name of the field that contains the general text of a resource and also serves as prefix.static java.lang.String
FIELD_TEXT_DE
static java.lang.String
FIELD_TEXT_EL
static java.lang.String
FIELD_TEXT_EN
static java.lang.String
FIELD_TEXT_ES
static java.lang.String
FIELD_TEXT_FR
static java.lang.String
FIELD_TEXT_HU
static java.lang.String
FIELD_TEXT_IT
static java.lang.String
FIELD_TIMESTAMP
static java.lang.String
FIELD_TITLE
Name of the field that usually contains the value of the "Title" property of the document as a keyword used for sorting and also for retrieving the title text (optional).static java.lang.String
FIELD_TITLE_UNSTORED
Name of the field that usually contains the value of the "Title" property of the document in an analyzed form used for searching in the title (optional).static java.lang.String
FIELD_TYPE
Name of the field that contains the type of the document.static java.lang.String
FIELD_USER_CREATED
Name of the field that contains the user created.static java.lang.String
FIELD_USER_LAST_MODIFIED
Name of the field that contains the user last modified.static java.lang.String
FIELD_VERSION
Name of the field that contains the latest version number of the resource.
-
Constructor Summary
Constructors Constructor Description CmsSearchField()
Creates a new search field.CmsSearchField(java.lang.String name, java.lang.String defaultValue)
Creates a new search field.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMapping(I_CmsSearchFieldMapping mapping)
Adds a new field mapping to the internal list of mappings.static void
addUninvertingMappings(java.util.Map<java.lang.String,org.apache.solr.uninverting.UninvertingReader.Type> uninvertingMap)
To allow sorting on a field the field must be added to the map given toUninvertingReader.wrap(org.apache.lucene.index.DirectoryReader, Map)
.boolean
equals(java.lang.Object obj)
Two fields are equal if the name of the Lucene field is equal.java.lang.String
getDefaultValue()
Returns the default value to use if no content for this field was collected.java.lang.String
getIndexed()
Returns the String value state of this field if it is indexed (and possibly tokenized) in the index.java.util.List<I_CmsSearchFieldMapping>
getMappings()
Returns the mappings for this field.java.lang.String
getName()
Returns the name of this field in the Lucene search index.int
hashCode()
The hash code for a field is based only on the field name.boolean
isIndexed()
Returns the indexed.boolean
isInExcerpt()
Returnstrue
if this fields content is used in the search result excerpt.boolean
isStored()
Returnstrue
if the content of this field is stored in the Lucene index.void
setDefaultValue(java.lang.String defaultValue)
Sets the default value to use if no content for this field was collected.void
setIndexed(boolean indexed)
Controls if the content of this field is indexed (and possibly tokenized) in the Lucene index.void
setInExcerpt(boolean excerpt)
Controls if this fields content is used in the search result excerpt.void
setName(java.lang.String fieldName)
Sets the name of this field in the Lucene search index.void
setStored(boolean stored)
Controls if the content of this field is stored in the Lucene index.java.lang.String
toString()
-
-
-
Field Detail
-
FIELD_CATEGORY
public static final java.lang.String FIELD_CATEGORY
Name of the field that contains the (optional) category of the document (hardcoded).- See Also:
- Constant Field Values
-
FIELD_CONTENT
public static final java.lang.String FIELD_CONTENT
Name of the field that usually contains the complete content of the document (optional).- See Also:
- Constant Field Values
-
FIELD_CONTENT_BLOB
public static final java.lang.String FIELD_CONTENT_BLOB
Name of the field that contains the complete extracted content of the document as serialized object (hardcoded).- See Also:
- Constant Field Values
-
FIELD_CONTENT_LOCALES
public static final java.lang.String FIELD_CONTENT_LOCALES
Name of the field that contains the locale of the document.- See Also:
- Constant Field Values
-
FIELD_DATE_CONTENT
public static final java.lang.String FIELD_DATE_CONTENT
Name of the field that contains the document content date (hardcoded).- See Also:
- Constant Field Values
-
FIELD_DATE_CREATED
public static final java.lang.String FIELD_DATE_CREATED
Name of the field that contains the document creation date (hardcoded).- See Also:
- Constant Field Values
-
FIELD_DATE_CREATED_LOOKUP
public static final java.lang.String FIELD_DATE_CREATED_LOOKUP
Name of the field that contains the document creation date for fast lookup (hardcoded).- See Also:
- Constant Field Values
-
FIELD_DATE_EXPIRED
public static final java.lang.String FIELD_DATE_EXPIRED
The field name for the expiration date.- See Also:
- Constant Field Values
-
FIELD_DATE_LASTMODIFIED
public static final java.lang.String FIELD_DATE_LASTMODIFIED
Name of the field that contains the document last modification date (hardcoded).- See Also:
- Constant Field Values
-
FIELD_DATE_LASTMODIFIED_LOOKUP
public static final java.lang.String FIELD_DATE_LASTMODIFIED_LOOKUP
Name of the field that contains the document last modification date for fast lookup (hardcoded).- See Also:
- Constant Field Values
-
FIELD_DATE_LOOKUP_SUFFIX
public static final java.lang.String FIELD_DATE_LOOKUP_SUFFIX
The lookup suffix for date fields.- See Also:
- Constant Field Values
-
FIELD_DATE_RELEASED
public static final java.lang.String FIELD_DATE_RELEASED
The field name for the release date.- See Also:
- Constant Field Values
-
FIELD_DEPENDENCY_TYPE
public static final java.lang.String FIELD_DEPENDENCY_TYPE
The dependency type.- See Also:
- Constant Field Values
-
FIELD_DESCRIPTION
public static final java.lang.String FIELD_DESCRIPTION
Name of the field that usually contains the value of the "Description" property of the document (optional).- See Also:
- Constant Field Values
-
FIELD_DYNAMIC_EXACT
public static final java.lang.String FIELD_DYNAMIC_EXACT
Name of the dynamic exact field.- See Also:
- Constant Field Values
-
FIELD_DYNAMIC_PROPERTIES
public static final java.lang.String FIELD_DYNAMIC_PROPERTIES
Name of the dynamic property field (searched properties).- See Also:
- Constant Field Values
-
FIELD_DYNAMIC_PROPERTIES_DIRECT
public static final java.lang.String FIELD_DYNAMIC_PROPERTIES_DIRECT
Name of the dynamic property field (non-searched properties).- See Also:
- Constant Field Values
-
FIELD_EXCERPT
public static final java.lang.String FIELD_EXCERPT
The name of the dynamic field that stores the shortened value of the content field in order to save performance.- See Also:
- Constant Field Values
-
FIELD_FILENAME
public static final java.lang.String FIELD_FILENAME
Name of the field that contains the filename.- See Also:
- Constant Field Values
-
FIELD_ID
public static final java.lang.String FIELD_ID
Name of the field that contains the documents structure id.- See Also:
- Constant Field Values
-
FIELD_KEYWORDS
public static final java.lang.String FIELD_KEYWORDS
Name of the field that usually contains the value of the "Keywords" property of the document (optional).- See Also:
- Constant Field Values
-
FIELD_LINK
public static final java.lang.String FIELD_LINK
The field name for the link.- See Also:
- Constant Field Values
-
FIELD_META
public static final java.lang.String FIELD_META
Name of the field that usually combines all document "meta" information, that is the values of the "Title", "Keywords" and "Description" properties (optional).- See Also:
- Constant Field Values
-
FIELD_MIMETYPE
public static final java.lang.String FIELD_MIMETYPE
Name of the field that contains the mime type.- See Also:
- Constant Field Values
-
FIELD_PARENT_FOLDERS
public static final java.lang.String FIELD_PARENT_FOLDERS
Name of the field that contains all VFS parent folders of a document (hardcoded).- See Also:
- Constant Field Values
-
FIELD_PATH
public static final java.lang.String FIELD_PATH
Name of the field that contains the document root path in the VFS (hardcoded).- See Also:
- Constant Field Values
-
FIELD_PREFIX_DEPENDENCY
public static final java.lang.String FIELD_PREFIX_DEPENDENCY
The prefix used to store dependency fields.- See Also:
- Constant Field Values
-
FIELD_PREFIX_DYNAMIC
public static final java.lang.String FIELD_PREFIX_DYNAMIC
The prefix for dynamic fields.- See Also:
- Constant Field Values
-
FIELD_PREFIX_TEXT
public static final java.lang.String FIELD_PREFIX_TEXT
The default text field prefix.- See Also:
- Constant Field Values
-
FIELD_POSTFIX_STRING
public static final java.lang.String FIELD_POSTFIX_STRING
The default string field postfix.- See Also:
- Constant Field Values
-
FIELD_POSTFIX_DATE
public static final java.lang.String FIELD_POSTFIX_DATE
The default (single-valued) date field postfix.- See Also:
- Constant Field Values
-
FIELD_POSTFIX_DATES
public static final java.lang.String FIELD_POSTFIX_DATES
The default (multi-valued) dates field postfix.- See Also:
- Constant Field Values
-
FIELD_POSTFIX_DATE_RANGE
public static final java.lang.String FIELD_POSTFIX_DATE_RANGE
The default (single-valued) date range field postfix.- See Also:
- Constant Field Values
-
FIELD_POSTFIX_DATE_RANGES
public static final java.lang.String FIELD_POSTFIX_DATE_RANGES
The default (multi-valued) date range field postfix.- See Also:
- Constant Field Values
-
FIELD_POSTFIX_INT
public static final java.lang.String FIELD_POSTFIX_INT
The default int field postfix.- See Also:
- Constant Field Values
-
FIELD_POSTFIX_LOC
public static final java.lang.String FIELD_POSTFIX_LOC
The default local field postfix.- See Also:
- Constant Field Values
-
FIELD_POSTFIX_SORT
public static final java.lang.String FIELD_POSTFIX_SORT
The default field postfix for alpha-numeric sorting.- See Also:
- Constant Field Values
-
FIELD_PRIORITY
public static final java.lang.String FIELD_PRIORITY
Name of the field that contains the (optional) document priority, which can be used to boost the document in the result list (hardcoded).- See Also:
- Constant Field Values
-
FIELD_RESOURCE_LOCALES
public static final java.lang.String FIELD_RESOURCE_LOCALES
Name of the field that contains the resource locales of the document.- See Also:
- Constant Field Values
-
FIELD_SCORE
public static final java.lang.String FIELD_SCORE
The name of the score field.- See Also:
- Constant Field Values
-
FIELD_SEARCH_EXCLUDE
public static final java.lang.String FIELD_SEARCH_EXCLUDE
Name of the field that contains the searched property value of 'search.exclude'.- See Also:
- Constant Field Values
-
FIELD_SIZE
public static final java.lang.String FIELD_SIZE
Name of the field that usually contains file size.- See Also:
- Constant Field Values
-
FIELD_SORT_TITLE
public static final java.lang.String FIELD_SORT_TITLE
Name of the field that contains the lower-case title, untokenized, for sorting.- See Also:
- Constant Field Values
-
FIELD_STATE
public static final java.lang.String FIELD_STATE
Name of the field that contains the resource state.- See Also:
- Constant Field Values
-
FIELD_SUFFIX
public static final java.lang.String FIELD_SUFFIX
Name of the field that contains the file name suffix of the resource.- See Also:
- Constant Field Values
-
FIELD_TEXT
public static final java.lang.String FIELD_TEXT
Name of the field that contains the general text of a resource and also serves as prefix.- See Also:
- Constant Field Values
-
FIELD_TITLE
public static final java.lang.String FIELD_TITLE
Name of the field that usually contains the value of the "Title" property of the document as a keyword used for sorting and also for retrieving the title text (optional). Please note: This field should NOT be used for searching. UseFIELD_TITLE_UNSTORED
instead.- See Also:
- Constant Field Values
-
FIELD_TITLE_UNSTORED
public static final java.lang.String FIELD_TITLE_UNSTORED
Name of the field that usually contains the value of the "Title" property of the document in an analyzed form used for searching in the title (optional).- See Also:
- Constant Field Values
-
FIELD_TIMESTAMP
public static final java.lang.String FIELD_TIMESTAMP
- See Also:
- Constant Field Values
-
FIELD_PATH_HIERARCHY
public static final java.lang.String FIELD_PATH_HIERARCHY
- See Also:
- Constant Field Values
-
FIELD_CONTAINER_TYPES
public static final java.lang.String FIELD_CONTAINER_TYPES
Name of the field that contains the gallery index container information.- See Also:
- Constant Field Values
-
FIELD_CATEGORY_EXACT
public static final java.lang.String FIELD_CATEGORY_EXACT
- See Also:
- Constant Field Values
-
FIELD_ADDITIONAL_INFO
public static final java.lang.String FIELD_ADDITIONAL_INFO
Name of the field that contains the gallery index additional information.- See Also:
- Constant Field Values
-
FIELD_PLACE
public static final java.lang.String FIELD_PLACE
- See Also:
- Constant Field Values
-
FIELD_SPELL
public static final java.lang.String FIELD_SPELL
- See Also:
- Constant Field Values
-
FIELD_TEXT_EN
public static final java.lang.String FIELD_TEXT_EN
- See Also:
- Constant Field Values
-
FIELD_TEXT_DE
public static final java.lang.String FIELD_TEXT_DE
- See Also:
- Constant Field Values
-
FIELD_TEXT_EL
public static final java.lang.String FIELD_TEXT_EL
- See Also:
- Constant Field Values
-
FIELD_TEXT_ES
public static final java.lang.String FIELD_TEXT_ES
- See Also:
- Constant Field Values
-
FIELD_TEXT_FR
public static final java.lang.String FIELD_TEXT_FR
- See Also:
- Constant Field Values
-
FIELD_TEXT_HU
public static final java.lang.String FIELD_TEXT_HU
- See Also:
- Constant Field Values
-
FIELD_TEXT_IT
public static final java.lang.String FIELD_TEXT_IT
- See Also:
- Constant Field Values
-
FIELD_SEARCH_CHANNEL
public static final java.lang.String FIELD_SEARCH_CHANNEL
- See Also:
- Constant Field Values
-
FIELD_DISPTITLE
public static final java.lang.String FIELD_DISPTITLE
The field PREFIX of the fields that contain the display title (without locale and postfix "_s").- See Also:
- Constant Field Values
-
FIELD_DISPORDER
public static final java.lang.String FIELD_DISPORDER
The field PREFIX of the fields that contain the display order (without locale and postfix "_i").- See Also:
- Constant Field Values
-
FIELD_GEOCOORDS
public static final java.lang.String FIELD_GEOCOORDS
Name of the field that contains Geo coordinates.- See Also:
- Constant Field Values
-
FIELD_INSTANCEDATE
public static final java.lang.String FIELD_INSTANCEDATE
The field PREFIX where the start date for the single entry of a serial date entry set is stored.- See Also:
- Constant Field Values
-
FIELD_INSTANCEDATE_END
public static final java.lang.String FIELD_INSTANCEDATE_END
The field PREFIX where the end date for the single entry of a serial date entry set is stored.- See Also:
- Constant Field Values
-
FIELD_INSTANCEDATE_CURRENT_TILL
public static final java.lang.String FIELD_INSTANCEDATE_CURRENT_TILL
The field PREFIX where the date until which the single entry of a serial date entry should be treated as "current" is stored.- See Also:
- Constant Field Values
-
FIELD_INSTANCEDATE_RANGE
public static final java.lang.String FIELD_INSTANCEDATE_RANGE
The field PREFIX where the start date and the end date of the single entry of a serial date entry is stored as a date range.- See Also:
- Constant Field Values
-
FIELD_SERIESDATES
public static final java.lang.String FIELD_SERIESDATES
The field where the dates for a serial date are stored.- See Also:
- Constant Field Values
-
FIELD_SERIESDATES_END
public static final java.lang.String FIELD_SERIESDATES_END
The field where the end dates for a serial date are stored. NOTE: The field is only used during indexing and not stored in the content itself.- See Also:
- Constant Field Values
-
FIELD_SERIESDATES_CURRENT_TILL
public static final java.lang.String FIELD_SERIESDATES_CURRENT_TILL
The field where the dates until when the single serial dates are treated as "current" are stored. NOTE: The field is only used during indexing and not stored in the content itself.- See Also:
- Constant Field Values
-
FIELD_SERIESDATES_TYPE
public static final java.lang.String FIELD_SERIESDATES_TYPE
The field where the type of the date series is stored.- See Also:
- Constant Field Values
-
FIELD_TYPE
public static final java.lang.String FIELD_TYPE
Name of the field that contains the type of the document.- See Also:
- Constant Field Values
-
FIELD_USER_CREATED
public static final java.lang.String FIELD_USER_CREATED
Name of the field that contains the user created.- See Also:
- Constant Field Values
-
FIELD_USER_LAST_MODIFIED
public static final java.lang.String FIELD_USER_LAST_MODIFIED
Name of the field that contains the user last modified.- See Also:
- Constant Field Values
-
FIELD_VERSION
public static final java.lang.String FIELD_VERSION
Name of the field that contains the latest version number of the resource.- See Also:
- Constant Field Values
-
FIELD_SOLR_ID
public static final java.lang.String FIELD_SOLR_ID
Name of the field that contains the unique Solr id.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsSearchField
public CmsSearchField()
Creates a new search field.
-
CmsSearchField
public CmsSearchField(java.lang.String name, java.lang.String defaultValue)
Creates a new search field.- Parameters:
name
- the name of the field, seesetName(String)
defaultValue
- the default value to use, seesetDefaultValue(String)
-
-
Method Detail
-
addUninvertingMappings
public static void addUninvertingMappings(java.util.Map<java.lang.String,org.apache.solr.uninverting.UninvertingReader.Type> uninvertingMap)
To allow sorting on a field the field must be added to the map given toUninvertingReader.wrap(org.apache.lucene.index.DirectoryReader, Map)
. The method adds all default fields.- Parameters:
uninvertingMap
- the map to which the fields are added.
-
addMapping
public void addMapping(I_CmsSearchFieldMapping mapping)
Adds a new field mapping to the internal list of mappings.- Parameters:
mapping
- the mapping to add
-
equals
public boolean equals(java.lang.Object obj)
Two fields are equal if the name of the Lucene field is equal.- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getDefaultValue
public java.lang.String getDefaultValue()
Returns the default value to use if no content for this field was collected.In case no default is configured,
null
is returned.- Returns:
- the default value to use if no content for this field was collected
-
getIndexed
public java.lang.String getIndexed()
Returns the String value state of this field if it is indexed (and possibly tokenized) in the index.IMPORTANT: Not supported by Solr
- Returns:
- the String value state of this field if it is indexed (and possibly tokenized) in the index
-
getMappings
public java.util.List<I_CmsSearchFieldMapping> getMappings()
Returns the mappings for this field.- Returns:
- the mappings for this field
-
getName
public java.lang.String getName()
Returns the name of this field in the Lucene search index.- Returns:
- the name of this field in the Lucene search index
-
hashCode
public int hashCode()
The hash code for a field is based only on the field name.- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
isIndexed
public boolean isIndexed()
Returns the indexed.- Returns:
- the indexed
-
isInExcerpt
public boolean isInExcerpt()
Returnstrue
if this fields content is used in the search result excerpt.- Returns:
true
if this fields content is used in the search result excerpt- See Also:
isStored()
-
isStored
public boolean isStored()
Returnstrue
if the content of this field is stored in the Lucene index.Please refer to the Lucene documentation about
Field.Store
for the concept behind stored and unstored fields.- Returns:
true
if the content of this field is stored in the Lucene index
-
setDefaultValue
public void setDefaultValue(java.lang.String defaultValue)
Sets the default value to use if no content for this field was collected.- Parameters:
defaultValue
- the default value to set
-
setIndexed
public void setIndexed(boolean indexed)
Controls if the content of this field is indexed (and possibly tokenized) in the Lucene index.- Parameters:
indexed
- the indexed to set
-
setInExcerpt
public void setInExcerpt(boolean excerpt)
Controls if this fields content is used in the search result excerpt.- Parameters:
excerpt
- iftrue
, then this fields content is used in the search excerpt
-
setName
public void setName(java.lang.String fieldName)
Sets the name of this field in the Lucene search index.- Parameters:
fieldName
- the name to set
-
setStored
public void setStored(boolean stored)
Controls if the content of this field is stored in the Lucene index.Please refer to the Lucene documentation about
Field.Store
for the concept behind stored and unstored fields.- Parameters:
stored
- iftrue
, then the field content is stored
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-