Interface IndexableElementType<T>

Type Parameters:
T - Type of the element value
All Superinterfaces:
ElementType<T>, IndexableModelItemType, ModelItemType, PluginAware
All Known Subinterfaces:
SortableIndexableElementType<T>
All Known Implementing Classes:
BinaryIndexableElementType, BinaryRepositoryElementType, BooleanIndexableElementType, BooleanRepositoryElementType, ContentContentElementType, ContentIndexableElementType, ContentRepositoryElementType, DateIndexableElementType, DateRepositoryElementType, DateTimeIndexableElementType, DateTimeRepositoryElementType, DoubleIndexableElementType, DoubleRepositoryElementType, FileContentElementType, FileIndexableElementType, FileRepositoryElementType, GeocodeIndexableElementType, GeocodeRepositoryElementType, HTMLRichTextContentElementType, HTMLRichTextRepositoryElementType, LongIndexableElementType, LongRepositoryElementType, MultilingualStringIndexableElementType, MultilingualStringRepositoryElementType, PasswordRepositoryElementType, ReferenceContentElementType, ReferenceIndexableElementType, ReferenceRepositoryElementType, RichTextContentElementType, RichTextIndexableElementType, RichTextRepositoryElementType, StringIndexableElementType, StringRepositoryElementType, UserIndexableElementType, UserRepositoryElementType

Interface for element types that can be indexed
  • Method Details

    • indexValue

      default void indexValue(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, Object value, DataContext context)
      Description copied from interface: IndexableModelItemType
      Index the given value in a solr document.
      Specified by:
      indexValue in interface IndexableModelItemType
      Parameters:
      document - the solr document to index into.
      rootObjectDocument - the solr document of the root object.
      fieldName - the name of the indexing field
      value - the value to index
      context - the context of the data to index. Can not be null.
    • indexSingleValue

      void indexSingleValue(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, T value, DataContext context)
      Index the given single value in a solr document.
      Parameters:
      document - the solr document to index into.
      rootObjectDocument - the solr document of the root object.
      fieldName - the name of the indexing field
      value - the single value to index
      context - the context of the data to index. Can not be null.
    • getSingleValueToIndex

      default <X> X getSingleValueToIndex(T value)
      Retrieves the formatted value to index
      Type Parameters:
      X - Type of the value to retrieve
      Parameters:
      value - the value to index
      Returns:
      the formatted value
    • getSchemaType

      Get the solr schema type from the type.
      Returns:
      The solr schema type.
    • getIndexingFieldSuffix

      Retrieves the indexing solr field suffix for this type
      Parameters:
      context - the indexable data context
      Returns:
      the indexing solr field suffix
    • getWildcardFieldSuffix

      Retrieves the wildcard solr field suffix for this type
      Parameters:
      context - the indexable data context
      Returns:
      the wildcard solr field suffix
    • getTextFieldSuffix

      Retrieves the text solr field suffix for this type
      Parameters:
      context - the indexable data context
      Returns:
      the text solr field suffix
    • isFacetable

      default boolean isFacetable(DataContext context)
      Checks if data of this type is facetable
      Parameters:
      context - the indexable data context
      Returns:
      true if the type is facetable, false otherwise