Struct elastiql::search::Hit [−][src]
pub struct Hit<T> { pub id: String, pub index: String, pub source: T, pub version: Option<u64>, pub sequence_number: Option<u64>, pub primary_term: Option<u64>, pub score: Option<f32>, pub highlight: HashMap<String, Vec<String>>, pub sort: Vec<Value>, }
Expand description
An individual Elasticsearch search hit/match.
Fields
id: String
The database Id of this Document
.
index: String
The name of the database index that this Document
belongs to.
TODO: should this be a different type?
source: T
The actual Document
of this search hit/match.
version: Option<u64>
The version number of this Document
.
sequence_number: Option<u64>
The sequence number number of this Document
, used for
optimistic concurrency control.
primary_term: Option<u64>
The primary term of this Document
, used for
optimistic concurrency control.
score: Option<f32>
The relevance score for this search hit.
highlight: HashMap<String, Vec<String>>
The highlighted snippets of the part(s) of the field(s) matching the search query.
sort: Vec<Value>
The live cursor from which to search after to fascilitate pagination.
Trait Implementations
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
Auto Trait Implementations
impl<T> RefUnwindSafe for Hit<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Hit<T> where
T: UnwindSafe,