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

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.