Interface IndexFieldTypeConverterStep<S extends IndexFieldTypeConverterStep<?,F>,F>
-
- Type Parameters:
S
- The "self" type (the actual exposed type of this step).F
- The type of field values.
- All Known Subinterfaces:
ElasticsearchNativeIndexFieldTypeOptionsStep<S>
,ElasticsearchStandardIndexFieldTypeOptionsStep<S,F>
,IndexFieldTypeOptionsStep<S,F>
,LuceneStandardIndexFieldTypeOptionsStep<S,F>
,ScaledNumberIndexFieldTypeOptionsStep<S,F>
,StandardIndexFieldTypeOptionsStep<S,F>
,StringIndexFieldTypeOptionsStep<S>
public interface IndexFieldTypeConverterStep<S extends IndexFieldTypeConverterStep<?,F>,F>
The step in an index field type definition where DSL converters (applied when using the search DSL) and projection converters (applied when projecting in a search query) can be set.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> S
dslConverter(Class<V> valueType, ToDocumentFieldValueConverter<V,? extends F> toIndexConverter)
Define how values passed to the predicate and sort DSL should be converted to the type of field values.<V> S
projectionConverter(Class<V> valueType, FromDocumentFieldValueConverter<? super F,V> fromIndexConverter)
Define how values returned when projecting on fields of this type should be converted before being returned to the user.
-
-
-
Method Detail
-
dslConverter
<V> S dslConverter(Class<V> valueType, ToDocumentFieldValueConverter<V,? extends F> toIndexConverter)
Define how values passed to the predicate and sort DSL should be converted to the type of field values.When not set, users are expected to pass the field's value type directly.
- Type Parameters:
V
- The type of values that can be passed to the DSL.- Parameters:
valueType
- The type of values that can be passed to the DSL.toIndexConverter
- A converter from the given value type to the index field type.- Returns:
this
, for method chaining.
-
projectionConverter
<V> S projectionConverter(Class<V> valueType, FromDocumentFieldValueConverter<? super F,V> fromIndexConverter)
Define how values returned when projecting on fields of this type should be converted before being returned to the user.When not set, users will be returned the field's value type directly.
- Type Parameters:
V
- The type of values that will be returned when projecting on fields of this type.- Parameters:
valueType
- The type of values that will be returned when projecting on fields of this type.fromIndexConverter
- A converter from the index field type to the given value type.- Returns:
this
, for method chaining.
-
-