public class Elasticsearch extends Object implements FieldMetadataCreationContext
FieldMetadataCreationContext
allowing the user to define additional properties for a field specific
to Elasticsearch.Constructor and Description |
---|
Elasticsearch(BridgeDefinedField definedField,
FieldMetadataCreationContext creationContext) |
Modifier and Type | Method and Description |
---|---|
Elasticsearch |
dynamic(DynamicType dynamicType)
The dynamic type of the field, overrides the global configuration.
|
FieldMetadataCreationContext |
field(String name,
FieldType type)
Adds a field to the list of all meta-data.
|
<T extends FieldMetadataCreationContext> |
mappedOn(Class<T> backendType)
Gives access to properties that are specific to an indexing technology.
|
FieldMetadataCreationContext |
sortable(boolean sortable)
Marks the last added field as sortable.
|
public Elasticsearch(BridgeDefinedField definedField, FieldMetadataCreationContext creationContext)
public FieldMetadataCreationContext field(String name, FieldType type)
FieldMetadataCreationContext
field
in interface FieldMetadataCreationContext
name
- The name of the fieldtype
- The type of the field; The type of the field created in
FieldBridge.set(String, Object, org.apache.lucene.document.Document, org.hibernate.search.bridge.LuceneOptions)
must match the type declared for the field here.public FieldMetadataCreationContext sortable(boolean sortable)
FieldMetadataCreationContext
sortable
in interface FieldMetadataCreationContext
sortable
- whether the last added field is sortable or not.public <T extends FieldMetadataCreationContext> T mappedOn(Class<T> backendType)
FieldMetadataCreationContext
mappedOn
in interface FieldMetadataCreationContext
backendType
- the selected index technology.public Elasticsearch dynamic(DynamicType dynamicType)
For more details: DynamicType
dynamicType
- the dynamic value for the fieldCopyright © 2006-2017 Red Hat, Inc. All Rights Reserved