java.lang.Object
org.elasticsearch.action.update.UpdateHelper
Helper for translating an update request to an index, delete request or update response.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Field names used to populate the script contextstatic class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GetResult
extractGetResult
(UpdateRequest request, String concreteIndex, MappingLookup mappingLookup, long seqNo, long primaryTerm, long version, Map<String, Object> source, XContentType sourceContentType, BytesReference sourceAsBytes) AppliesUpdateRequest.fetchSource()
to the _source of the updated document to be returned in a update response.prepare
(UpdateRequest request, IndexShard indexShard, LongSupplier nowInMillis) Prepares an update request by converting it into an index or delete request or an update response (no action).prepare
(UpdateRequest request, IndexShard indexShard, LongSupplier nowInMillis, String[] gFields) Prepares an update request by converting it into an index or delete request or an update response (no action).protected UpdateHelper.Result
prepare
(IndexShard indexShard, UpdateRequest request, GetResult getResult, LongSupplier nowInMillis) Prepares an update request by converting it into an index or delete request or an update response (no action, in the event of a noop).
-
Constructor Details
-
UpdateHelper
-
-
Method Details
-
prepare
public UpdateHelper.Result prepare(UpdateRequest request, IndexShard indexShard, LongSupplier nowInMillis) throws IOException Prepares an update request by converting it into an index or delete request or an update response (no action).- Throws:
IOException
-
prepare
public UpdateHelper.Result prepare(UpdateRequest request, IndexShard indexShard, LongSupplier nowInMillis, String[] gFields) throws IOException Prepares an update request by converting it into an index or delete request or an update response (no action).- Throws:
IOException
-
prepare
protected UpdateHelper.Result prepare(IndexShard indexShard, UpdateRequest request, GetResult getResult, LongSupplier nowInMillis) Prepares an update request by converting it into an index or delete request or an update response (no action, in the event of a noop). -
extractGetResult
public static GetResult extractGetResult(UpdateRequest request, String concreteIndex, MappingLookup mappingLookup, long seqNo, long primaryTerm, long version, Map<String, Object> source, XContentType sourceContentType, @Nullable BytesReference sourceAsBytes) AppliesUpdateRequest.fetchSource()
to the _source of the updated document to be returned in a update response. // TODO can we pass a Source here rather than Map, XcontentType and BytesReference?
-