Struct rs_es::operations::bulk::Action [] [src]

pub struct Action {
    // some fields omitted
}

A bulk operation consists of one or more Actions.

Methods

impl Action

fn index<E: ToJson>(document: E) -> Action

An index action.

Takes the document to be indexed, other parameters can be set as optional on the Action struct returned.

Example

use rs_es::operations::bulk::Action;

let delete_action = Action::delete("doc_id");

fn create<E: ToJson>(document: E) -> Action

Create action

fn delete<S: Into<String>>(id: S) -> Action

fn update<S: Into<String>>(id: S, update: &ActionSource) -> Action

fn with_index<T: Into<String>>(self, val: T) -> Self

fn with_doc_type<T: Into<String>>(self, val: T) -> Self

fn with_id<T: Into<String>>(self, val: T) -> Self

fn with_version<T: Into<u64>>(self, val: T) -> Self

fn with_version_type<T: Into<VersionType>>(self, val: T) -> Self

fn with_routing<T: Into<String>>(self, val: T) -> Self

fn with_parent<T: Into<String>>(self, val: T) -> Self

fn with_timestamp<T: Into<String>>(self, val: T) -> Self

fn with_ttl<T: Into<Duration>>(self, val: T) -> Self

fn with_retry_on_conflict<T: Into<u64>>(self, val: T) -> Self

Trait Implementations

impl ToJson for Action

fn to_json(&self) -> Json