Struct elasticsearch::BulkIndexOperation
source · [−]pub struct BulkIndexOperation<B> { /* private fields */ }
Expand description
Bulk index operation
Implementations
sourceimpl<B> BulkIndexOperation<B>
impl<B> BulkIndexOperation<B>
sourcepub fn new(source: B) -> Self
pub fn new(source: B) -> Self
Creates a new instance of BulkIndexOperation
sourcepub fn id<S>(self, id: S) -> Self where
S: Into<String>,
pub fn id<S>(self, id: S) -> Self where
S: Into<String>,
Specify the id for the document
If an id is not specified, Elasticsearch will generate an id for the document which will be returned in the response.
sourcepub fn index<S>(self, index: S) -> Self where
S: Into<String>,
pub fn index<S>(self, index: S) -> Self where
S: Into<String>,
Specify the name of the index to perform the bulk update operation against.
Each bulk operation can specify an index to operate against. If all bulk operations in one Bulk API call will operate against the same index, specify the index on Bulk using BulkParts::Index, and omit specifying the index on each bulk operation.
sourcepub fn pipeline<S>(self, pipeline: S) -> Self where
S: Into<String>,
pub fn pipeline<S>(self, pipeline: S) -> Self where
S: Into<String>,
The ID of the pipeline to use to preprocess incoming documents
sourcepub fn routing<S>(self, routing: S) -> Self where
S: Into<String>,
pub fn routing<S>(self, routing: S) -> Self where
S: Into<String>,
Target the specified primary shard
sourcepub fn if_seq_no(self, seq_no: i64) -> Self
pub fn if_seq_no(self, seq_no: i64) -> Self
specify a sequence number to use for optimistic concurrency control
sourcepub fn if_primary_term(self, primary_term: i64) -> Self
pub fn if_primary_term(self, primary_term: i64) -> Self
specify a primary term to use for optimistic concurrency control
sourcepub fn version(self, version: i64) -> Self
pub fn version(self, version: i64) -> Self
specify a version number to use for optimistic concurrency control
sourcepub fn version_type(self, version_type: VersionType) -> Self
pub fn version_type(self, version_type: VersionType) -> Self
The type of versioning used when a version is specified
Trait Implementations
sourceimpl<B> From<BulkIndexOperation<B>> for BulkOperation<B>
impl<B> From<BulkIndexOperation<B>> for BulkOperation<B>
sourcefn from(b: BulkIndexOperation<B>) -> Self
fn from(b: BulkIndexOperation<B>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl<B> RefUnwindSafe for BulkIndexOperation<B> where
B: RefUnwindSafe,
impl<B> Send for BulkIndexOperation<B> where
B: Send,
impl<B> Sync for BulkIndexOperation<B> where
B: Sync,
impl<B> Unpin for BulkIndexOperation<B> where
B: Unpin,
impl<B> UnwindSafe for BulkIndexOperation<B> where
B: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more