elasticsearch_dsl/search/sort/
sort_special_field.rs1#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
3pub enum SortSpecialField {
4 #[serde(rename = "_score")]
6 Score,
7
8 #[serde(rename = "_doc")]
10 DocumentIndexOrder,
11
12 #[serde(rename = "_shard_doc")]
14 ShardDocumentOrder,
15}
16
17impl std::fmt::Display for SortSpecialField {
18 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
19 match self {
20 Self::Score => "_score".fmt(f),
21 Self::DocumentIndexOrder => "_doc".fmt(f),
22 Self::ShardDocumentOrder => "_shard_doc".fmt(f),
23 }
24 }
25}