pub struct Document { /* private fields */ }
Expand description
One of like
and unlike
types which has like document structure
Implementations§
Source§impl Document
impl Document
Sourcepub fn new<T>(id: T) -> Selfwhere
T: ToString,
pub fn new<T>(id: T) -> Selfwhere
T: ToString,
Creates an instance of Document
id
- document id as string.
Sourcepub fn index<T>(self, index: T) -> Selfwhere
T: ToString,
pub fn index<T>(self, index: T) -> Selfwhere
T: ToString,
The index that contains the document. Required if no index is specified in the request URI.
Sourcepub fn routing<T>(self, routing: T) -> Selfwhere
T: ToString,
pub fn routing<T>(self, routing: T) -> Selfwhere
T: ToString,
The key for the primary shard the document resides on. Required if routing is used during indexing.
Sourcepub fn source<T>(self, source: T) -> Selfwhere
T: Into<SourceFilter>,
pub fn source<T>(self, source: T) -> Selfwhere
T: Into<SourceFilter>,
If false
, excludes all _source
fields. Defaults to true
.
Sourcepub fn stored_fields<T>(self, stored_fields: T) -> Selfwhere
T: Into<StoredFields>,
pub fn stored_fields<T>(self, stored_fields: T) -> Selfwhere
T: Into<StoredFields>,
The stored fields you want to retrieve.
Trait Implementations§
impl Eq for Document
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more