Interface SortableIndexableElementType<T>

Type Parameters:
T - Type of the element value
All Superinterfaces:
ElementType<T>, IndexableElementType<T>, IndexableModelItemType, ModelItemType, PluginAware
All Known Implementing Classes:
BooleanIndexableElementType, BooleanRepositoryElementType, ContentContentElementType, ContentIndexableElementType, ContentRepositoryElementType, DateIndexableElementType, DateRepositoryElementType, DateTimeIndexableElementType, DateTimeRepositoryElementType, DoubleIndexableElementType, DoubleRepositoryElementType, LongIndexableElementType, LongRepositoryElementType, MultilingualStringIndexableElementType, MultilingualStringRepositoryElementType, PasswordRepositoryElementType, ReferenceContentElementType, ReferenceIndexableElementType, ReferenceRepositoryElementType, StringIndexableElementType, StringRepositoryElementType, UserIndexableElementType, UserRepositoryElementType

public interface SortableIndexableElementType<T> extends IndexableElementType<T>
Interface for element types that can be indexed and with sort value
  • Method Details

    • indexValue

      default void indexValue(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, Object value, IndexableDataContext context)
      Description copied from interface: IndexableModelItemType
      Index the given value in a solr document.
      Specified by:
      indexValue in interface IndexableElementType<T>
      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.
    • indexSingleSortValue

      default void indexSingleSortValue(org.apache.solr.common.SolrInputDocument document, String fieldName, T value, DataContext context)
      Index the given single value in sort field in a solr document.
      Parameters:
      document - the solr document to index into.
      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.
    • getSortFieldSuffix

      Get the suffix for sorting
      Returns:
      The sort field suffix.
    • getSingleSortValueToIndex

      default <X> X getSingleSortValueToIndex(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