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