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 Summary
Modifier and TypeMethodDescriptiondefault String
getIndexingFieldSuffix
(DataContext context) Retrieves the indexing solr field suffix for this typeGet the solr schema type from the type.default <X> X
getSingleValueToIndex
(T value) Retrieves the formatted value to indexgetTextFieldSuffix
(DataContext context) Retrieves the text solr field suffix for this typegetWildcardFieldSuffix
(DataContext context) Retrieves the wildcard solr field suffix for this typevoid
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.default void
indexValue
(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, Object value, DataContext context) Index the given value in a solr document.default boolean
isFacetable
(DataContext context) Checks if data of this type is facetableMethods 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.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, DataContext context) Description copied from interface:IndexableModelItemType
Index the given value in a solr document.- 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.
-
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 fieldvalue
- the single value to indexcontext
- the context of the data to index. Can not be null.
-
getSingleValueToIndex
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
Checks if data of this type is facetable- Parameters:
context
- the indexable data context- Returns:
true
if the type is facetable,false
otherwise
-