Struct elasticsearch_dsl::search::Hit
source · [−]pub struct Hit<H, IH> {
pub index: Option<String>,
pub id: String,
pub score: Option<f32>,
pub source: Option<H>,
pub highlight: HashMap<String, Vec<String>>,
pub inner_hits: Option<InnerHitsResponse<IH>>,
pub matched_queries: Vec<String>,
pub sort: Vec<Value>,
pub fields: BTreeMap<String, Value>,
}Expand description
Represents a single matched document
Fields
index: Option<String>Document index
id: StringDocument ID
score: Option<f32>Document score. None when documents are implicitly sorted by a
field other than _score
source: Option<H>Document source
highlight: HashMap<String, Vec<String>>Highlighted matches
inner_hits: Option<InnerHitsResponse<IH>>Inner hits
matched_queries: Vec<String>Matched queries
sort: Vec<Value>Values document was sorted by
fields: BTreeMap<String, Value>Field values for the documents. Need to be specified in the request
Trait Implementations
sourceimpl<'de, H, IH> Deserialize<'de> for Hit<H, IH> where
H: Deserialize<'de>,
IH: Deserialize<'de>,
impl<'de, H, IH> Deserialize<'de> for Hit<H, IH> where
H: Deserialize<'de>,
IH: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<H, IH> StructuralPartialEq for Hit<H, IH>
Auto Trait Implementations
impl<H, IH> RefUnwindSafe for Hit<H, IH> where
H: RefUnwindSafe,
IH: RefUnwindSafe,
impl<H, IH> Send for Hit<H, IH> where
H: Send,
IH: Send,
impl<H, IH> Sync for Hit<H, IH> where
H: Sync,
IH: Sync,
impl<H, IH> Unpin for Hit<H, IH> where
H: Unpin,
IH: Unpin,
impl<H, IH> UnwindSafe for Hit<H, IH> where
H: UnwindSafe,
IH: 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> 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