Module org.elasticsearch.server
Class InferenceFieldMetadata
java.lang.Object
org.elasticsearch.cluster.metadata.InferenceFieldMetadata
- All Implemented Interfaces:
Diffable<InferenceFieldMetadata>
,SimpleDiffable<InferenceFieldMetadata>
,Writeable
,ToXContent
,ToXContentFragment
public final class InferenceFieldMetadata
extends Object
implements SimpleDiffable<InferenceFieldMetadata>, ToXContentFragment
Contains inference field data for fields.
As inference is done in the coordinator node to avoid re-doing it at shard / replica level, the coordinator needs to check for the need
to perform inference for specific fields in an index.
Given that the coordinator node does not necessarily have mapping information for all indices (only for those that have shards
in the node), the field inference information must be stored in the IndexMetadata and broadcasted to all nodes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.cluster.SimpleDiffable
EMPTY
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionInferenceFieldMetadata
(String name, String inferenceId, String[] sourceFields) -
Method Summary
Modifier and TypeMethodDescriptionboolean
static InferenceFieldMetadata
fromXContent
(XContentParser parser) getName()
String[]
int
hashCode()
static Diff<InferenceFieldMetadata>
toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diff
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
InferenceFieldMetadata
-
InferenceFieldMetadata
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
getName
-
getInferenceId
-
getSourceFields
-
readDiffFrom
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
fromXContent
- Throws:
IOException
-