Class CmsSearchField

    • 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 to UninvertingReader.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()
      Returns true if this fields content is used in the search result excerpt.
      boolean isStored()
      Returns true 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()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 to UninvertingReader.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 class java.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
      • 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 class java.lang.Object
        See Also:
        Object.hashCode()
      • isIndexed

        public boolean isIndexed()
        Returns the indexed.

        Returns:
        the indexed
      • isInExcerpt

        public boolean isInExcerpt()
        Returns true 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()
        Returns true 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 - if true, 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 - if true, then the field content is stored
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()