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

pub struct Action<X>(_, _);

Methods

impl<S> Action<S> where S: Serialize
[src]

fn index(document: S) -> Self

An index action.

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

fn create(document: S) -> Self

Create action

impl<S> Action<S>
[src]

fn delete<A: Into<String>>(id: A) -> Self

Delete a document based on ID.

Example

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

let delete_action:Action<()> = Action::delete("doc_id");
let delete_with_index:Action<()> = Action::delete("doc_id").with_index("index_name");

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