Interface I_CmsSearchFieldConfiguration

All Superinterfaces:
Comparable<I_CmsSearchFieldConfiguration>, Serializable
All Known Implementing Classes:
A_CmsSearchFieldConfiguration, CmsLuceneFieldConfiguration, CmsSearchFieldConfiguration, CmsSearchFieldConfigurationOldCategories, CmsSolrFieldConfiguration

Interface for search field configurations used by I_CmsSearchIndex and configured in the opencms-search.xml (see CmsSearchConfiguration).
  • Method Details

    • addField

      void addField(CmsSearchField field)
      Adds a field to this search field configuration.

      Parameters:
      field - the field to add
    • addUninvertingMappings

      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 to UninvertingReader.wrap(org.apache.lucene.index.DirectoryReader, Map). The method adds the configured fields.
      Parameters:
      uninvertingMap - the map to which the fields are added.
    • createDocument

      Creates the document to index. The structure of the document depends on the concrete field configuration, the provided VFS resource, search index and extracted content.

      The method is typically triggered by I_CmsDocumentFactory.createDocument(CmsObject, CmsResource, I_CmsSearchIndex) to create the document.

      Parameters:
      cms - the OpenCms user context used to access the OpenCms VFS
      resource - the resource to create the document from
      index - the search index to create the document for
      extractionResult - the plain text content and additional information extracted from the document
      Returns:
      the document to index for the given VFS resource and the given search index
      Throws:
      CmsException - if something goes wrong
    • getDescription

      Returns the description of this field configuration.

      Returns:
      the description of this field configuration
    • getFields

      Returns the configured CmsSearchField instance with the given name.

      Returns:
      the configured CmsSearchField instance with the given name
    • getName

      Returns the name of this field configuration.

      Returns:
      the name of this field configuration
    • init

      void init()
      Initializes this field configuration.

    • setDescription

      void setDescription(String description)
      Sets the description of this field configuration.

      Parameters:
      description - the description to set
    • setName

      void setName(String name)
      Sets the name of this field configuration.

      Parameters:
      name - the name to set