pub struct Hit {
pub explanation: Option<Explanation>,
pub index: String,
pub id: String,
pub score: Option<f32>,
pub nested: Option<NestedIdentity>,
pub source: Source,
pub highlight: BTreeMap<String, Vec<String>>,
pub inner_hits: BTreeMap<String, InnerHitsResult>,
pub matched_queries: Vec<String>,
pub sort: Vec<Value>,
pub fields: BTreeMap<String, Value>,
}
Expand description
Represents a single matched document
Fields§
§explanation: Option<Explanation>
Search explanation
index: String
Document index
id: String
Document ID
score: Option<f32>
Document score. None
when documents are implicitly sorted by a
field other than _score
nested: Option<NestedIdentity>
Nested document identity
source: Source
Document source
highlight: BTreeMap<String, Vec<String>>
Highlighted matches
inner_hits: BTreeMap<String, InnerHitsResult>
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
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hit
impl<'de> Deserialize<'de> for Hit
Source§fn 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 StructuralPartialEq for Hit
Auto Trait Implementations§
impl Freeze for Hit
impl RefUnwindSafe for Hit
impl Send for Hit
impl Sync for Hit
impl Unpin for Hit
impl UnwindSafe for Hit
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