Class UpdateHelper

org.elasticsearch.action.update.UpdateHelper

public class UpdateHelper extends
Helper for translating an update request to an index, delete request or update response.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Field names used to populate the script context
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    UpdateHelper​(ScriptService scriptService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static GetResult
    extractGetResult​(UpdateRequest request,  concreteIndex, long seqNo, long primaryTerm, long version, <,​> source, org.elasticsearch.common.xcontent.XContentType sourceContentType, BytesReference sourceAsBytes)
    Applies UpdateRequest.fetchSource() to the _source of the updated document to be returned in a update response.
    prepare​(UpdateRequest request, IndexShard indexShard,  nowInMillis)
    Prepares an update request by converting it into an index or delete request or an update response (no action).
    prepare​(ShardId shardId, UpdateRequest request, GetResult getResult,  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).

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

    • UpdateHelper

      public UpdateHelper(ScriptService scriptService)
  • Method Details

    • prepare

      public UpdateHelper.Result prepare(UpdateRequest request, IndexShard indexShard,  nowInMillis)
      Prepares an update request by converting it into an index or delete request or an update response (no action).
    • prepare

      protected UpdateHelper.Result prepare(ShardId shardId, UpdateRequest request, GetResult getResult,  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,  concreteIndex, long seqNo, long primaryTerm, long version, <,​> source, org.elasticsearch.common.xcontent.XContentType sourceContentType, @Nullable BytesReference sourceAsBytes)
      Applies UpdateRequest.fetchSource() to the _source of the updated document to be returned in a update response.