Struct elasticsearch_dsl::search::queries::specialized::Document
source · [−]pub struct Document { /* private fields */ }Expand description
One of like and unlike types which has like document structure
Implementations
sourceimpl Document
impl Document
sourcepub fn new(id: impl Into<String>) -> Self
pub fn new(id: impl Into<String>) -> Self
Creates an instance of Document
id- document id as string.
sourcepub fn index(self, index: impl Into<String>) -> Self
pub fn index(self, index: impl Into<String>) -> Self
The index that contains the document. Required if no index is specified in the request URI.
sourcepub fn routing(self, routing: impl Into<String>) -> Self
pub fn routing(self, routing: impl Into<String>) -> Self
The key for the primary shard the document resides on. Required if routing is used during indexing.
sourcepub fn source(self, source: impl Into<SourceFilter>) -> Self
pub fn source(self, source: impl Into<SourceFilter>) -> Self
If false, excludes all _source fields. Defaults to true.
sourcepub fn stored_fields<I>(self, stored_fields: I) -> Self where
I: IntoIterator,
I::Item: ToString,
pub fn stored_fields<I>(self, stored_fields: I) -> Self where
I: IntoIterator,
I::Item: ToString,
The stored fields you want to retrieve.
Trait Implementations
impl StructuralPartialEq for Document
Auto Trait Implementations
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
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> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more