opensearch-dsl 0.3.1

Strongly typed OpenSearch DSL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// Sorts highlighted fragments by score when set to [`score`](Order::Score). By
/// default, fragments will be output in the order they appear in the field
/// (order: [`none`](Order::None)). Setting this option to
/// [`score`](Order::Score) will output the most relevant fragments first. Each
/// highlighter applies its own logic to compute relevancy scores. See the
/// document [How highlighters work internally](https://www.elastic.co/guide/en/opensearch/reference/current/highlighting.html#how-es-highlighters-work-internally)
/// for more details how different highlighters find the best fragments.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum Order {
    /// Sorts highlighted fragments by score.
    Score,

    /// Highlighted fragments will be output in the order they appear in the
    /// field.
    None,
}