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
Interface for element types that can be indexed and with sort value
-
Method Summary
Modifier and TypeMethodDescriptiondefault <X> X
getSingleSortValueToIndex
(T value) Retrieves the formatted value to indexGet the suffix for sortingdefault 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.default void
indexValue
(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, Object value, IndexableDataContext context) Index the given value in a solr document.Methods inherited from interface org.ametys.runtime.model.type.ElementType
castValue, compareValues, fromJSONForClient, getManagedClass, getManagedClassArray, isCompatible, isSimple, parseConfiguration, toString, valueFromXML
Methods inherited from interface org.ametys.cms.data.type.indexing.IndexableElementType
getIndexingFieldSuffix, getSchemaType, getSingleValueToIndex, getTextFieldSuffix, getWildcardFieldSuffix, indexSingleValue, indexSingleValueForFullTextField, isFacetable
Methods inherited from interface org.ametys.runtime.model.type.ModelItemType
getId, valueToJSONForClient, valueToJSONForClient, valueToJSONForEdition, valueToSAX, valueToSAX, valueToSAXForEdition
Methods inherited from interface org.ametys.runtime.plugin.component.PluginAware
setPluginInfo
-
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 interfaceIndexableElementType<T>
- Specified by:
indexValue
in interfaceIndexableModelItemType
- Parameters:
document
- the solr document to index into.rootObjectDocument
- the solr document of the root object.fieldName
- the name of the indexing fieldvalue
- the value to indexcontext
- 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 fieldvalue
- the single value to indexcontext
- the context of the data to index. Can not be null.
-
getSortFieldSuffix
Get the suffix for sorting- Returns:
- The sort field suffix.
-
getSingleSortValueToIndex
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
-