Class AbstractIndexValueFieldType<SC extends SearchIndexScope<?>,N extends SearchIndexValueFieldContext<SC>,F>
- java.lang.Object
-
- org.hibernate.search.engine.backend.types.spi.AbstractIndexValueFieldType<SC,N,F>
-
- All Implemented Interfaces:
IndexValueFieldTypeDescriptor,IndexFieldType<F>,SearchIndexNodeTypeContext<SC,N>,SearchIndexValueFieldTypeContext<SC,N,F>
public abstract class AbstractIndexValueFieldType<SC extends SearchIndexScope<?>,N extends SearchIndexValueFieldContext<SC>,F> extends Object implements IndexValueFieldTypeDescriptor, IndexFieldType<F>, SearchIndexValueFieldTypeContext<SC,N,F>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractIndexValueFieldType.Builder<SC extends SearchIndexScope<?>,N extends SearchIndexValueFieldContext<SC>,F>
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIndexValueFieldType(AbstractIndexValueFieldType.Builder<SC,N,F> builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaggregable()Optional<String>analyzerName()Class<?>dslArgumentClass()DslConverter<?,F>dslConverter()Optional<String>normalizerName()booleanprojectable()Class<?>projectedValueClass()ProjectionConverter<F,?>projectionConverter()<T> SearchQueryElementFactory<? extends T,? super SC,? super N>queryElementFactory(SearchQueryElementTypeKey<T> key)DslConverter<F,F>rawDslConverter()ProjectionConverter<F,F>rawProjectionConverter()booleansearchable()Optional<String>searchAnalyzerName()booleansortable()StringtoString()Class<F>valueClass()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.search.common.spi.SearchIndexValueFieldTypeContext
dslConverter, projectionConverter
-
-
-
-
Constructor Detail
-
AbstractIndexValueFieldType
protected AbstractIndexValueFieldType(AbstractIndexValueFieldType.Builder<SC,N,F> builder)
-
-
Method Detail
-
valueClass
public final Class<F> valueClass()
- Specified by:
valueClassin interfaceIndexValueFieldTypeDescriptor- Specified by:
valueClassin interfaceSearchIndexValueFieldTypeContext<SC extends SearchIndexScope<?>,N extends SearchIndexValueFieldContext<SC>,F>- Returns:
- The raw Java type of values for this field.
This may not be the expected type for arguments passed to the DSL for this field,
nor the type of projected values for this field.
See
IndexValueFieldTypeDescriptor.dslArgumentClass()
-
searchable
public final boolean searchable()
- Specified by:
searchablein interfaceIndexValueFieldTypeDescriptor- Returns:
trueif search predicates are supported on fields of this type. Some sorts may still be unsupported because they don't make sense (e.g. a "within circle" predicate on a string field).
-
sortable
public final boolean sortable()
- Specified by:
sortablein interfaceIndexValueFieldTypeDescriptor- Returns:
trueif sorts are supported on fields of this type. Some sorts may still be unsupported because they don't make sense (e.g. a distance sort aggregation on a string field).
-
projectable
public final boolean projectable()
- Specified by:
projectablein interfaceIndexValueFieldTypeDescriptor- Returns:
trueif projections are supported on fields of this type. Some projections may still be unsupported because they don't make sense (e.g. a distance projection aggregation on a string field).
-
aggregable
public final boolean aggregable()
- Specified by:
aggregablein interfaceIndexValueFieldTypeDescriptor- Returns:
trueif aggregations are supported on fields of this type. Some aggregations may still be unsupported because they don't make sense (e.g. a range aggregation on an analyzed string field).
-
dslArgumentClass
public final Class<?> dslArgumentClass()
- Specified by:
dslArgumentClassin interfaceIndexValueFieldTypeDescriptor- Returns:
- The expected raw Java type of arguments passed to the DSL for this field.
- See Also:
ValueConvert.YES,ToDocumentValueConverter
-
dslConverter
public final DslConverter<?,F> dslConverter()
- Specified by:
dslConverterin interfaceSearchIndexValueFieldTypeContext<SC extends SearchIndexScope<?>,N extends SearchIndexValueFieldContext<SC>,F>
-
rawDslConverter
public final DslConverter<F,F> rawDslConverter()
- Specified by:
rawDslConverterin interfaceSearchIndexValueFieldTypeContext<SC extends SearchIndexScope<?>,N extends SearchIndexValueFieldContext<SC>,F>
-
projectedValueClass
public final Class<?> projectedValueClass()
- Specified by:
projectedValueClassin interfaceIndexValueFieldTypeDescriptor- Returns:
- The raw Java type of projected values for this field.
- See Also:
ValueConvert.YES,FromDocumentValueConverter
-
projectionConverter
public final ProjectionConverter<F,?> projectionConverter()
- Specified by:
projectionConverterin interfaceSearchIndexValueFieldTypeContext<SC extends SearchIndexScope<?>,N extends SearchIndexValueFieldContext<SC>,F>
-
rawProjectionConverter
public final ProjectionConverter<F,F> rawProjectionConverter()
- Specified by:
rawProjectionConverterin interfaceSearchIndexValueFieldTypeContext<SC extends SearchIndexScope<?>,N extends SearchIndexValueFieldContext<SC>,F>
-
analyzerName
public final Optional<String> analyzerName()
- Specified by:
analyzerNamein interfaceIndexValueFieldTypeDescriptor- Returns:
- The name of the analyzer assigned to this type, if any. Only ever set for String fields.
-
normalizerName
public final Optional<String> normalizerName()
- Specified by:
normalizerNamein interfaceIndexValueFieldTypeDescriptor- Returns:
- The name of the normalizer assigned to this type, if any. Only ever set for String fields.
-
searchAnalyzerName
public final Optional<String> searchAnalyzerName()
- Specified by:
searchAnalyzerNamein interfaceIndexValueFieldTypeDescriptor- Returns:
- The name of the search analyzer assigned to this type, if any.
Only ever set for String fields.
By default, the search analyzer is the same as the
analyzer.
-
queryElementFactory
public final <T> SearchQueryElementFactory<? extends T,? super SC,? super N> queryElementFactory(SearchQueryElementTypeKey<T> key)
- Specified by:
queryElementFactoryin interfaceSearchIndexNodeTypeContext<SC extends SearchIndexScope<?>,N extends SearchIndexValueFieldContext<SC>>
-
-