public interface I_CmsSearchFieldConfiguration extends java.lang.Comparable<I_CmsSearchFieldConfiguration>, java.io.Serializable
I_CmsSearchIndex and configured in the
opencms-search.xml (see CmsSearchConfiguration).| Modifier and Type | Method and Description |
|---|---|
void |
addField(CmsSearchField field)
Adds a field to this search field configuration.
|
void |
addUninvertingMappings(java.util.Map<java.lang.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 to
UninvertingReader.wrap(org.apache.lucene.index.DirectoryReader, Map). |
I_CmsSearchDocument |
createDocument(CmsObject cms,
CmsResource resource,
I_CmsSearchIndex index,
I_CmsExtractionResult extractionResult)
Creates the document to index.
|
java.lang.String |
getDescription()
Returns the description of this field configuration.
|
java.util.List<CmsSearchField> |
getFields()
Returns the configured
CmsSearchField instance with the given name. |
java.lang.String |
getName()
Returns the name of this field configuration.
|
void |
init()
Initializes this field configuration.
|
void |
setDescription(java.lang.String description)
Sets the description of this field configuration.
|
void |
setName(java.lang.String name)
Sets the name of this field configuration.
|
void addField(CmsSearchField field)
field - the field to addvoid addUninvertingMappings(java.util.Map<java.lang.String,org.apache.solr.uninverting.UninvertingReader.Type> uninvertingMap)
UninvertingReader.wrap(org.apache.lucene.index.DirectoryReader, Map).
The method adds the configured fields.uninvertingMap - the map to which the fields are added.I_CmsSearchDocument createDocument(CmsObject cms, CmsResource resource, I_CmsSearchIndex index, I_CmsExtractionResult extractionResult) throws CmsException
The method is typically triggered by I_CmsDocumentFactory.createDocument(CmsObject, CmsResource, I_CmsSearchIndex) to create the document.
cms - the OpenCms user context used to access the OpenCms VFSresource - the resource to create the document fromindex - the search index to create the document forextractionResult - the plain text content and additional information extracted from the documentCmsException - if something goes wrongjava.lang.String getDescription()
java.util.List<CmsSearchField> getFields()
CmsSearchField instance with the given name.CmsSearchField instance with the given namejava.lang.String getName()
void init()
void setDescription(java.lang.String description)
description - the description to setvoid setName(java.lang.String name)
name - the name to set