From 38988c552bb794e2afe3745b5e93a12be69ce6f7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 24 Aug 2020 16:02:50 -0700 Subject: URL query parameters struct --- src/lib.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7d26360..a4cdc3c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,10 +9,7 @@ pub struct ApiRequest { pub body: Option, } -/* - -URL query parameters: - +pub struct UrlQueryParams { pub allow_no_indices: Option, pub allow_partial_search_results: Option, pub batched_reduce_size: Option, @@ -26,7 +23,7 @@ URL query parameters: pub max_concurrent_shard_requests: Option, pub pre_filter_shard_size: Option, pub preference: Option, - pub q: Option + pub q: Option, pub request_cache: Option, pub rest_total_hits_as_int: Option, pub routing: Option, @@ -48,7 +45,7 @@ URL query parameters: pub track_total_hits: Option, // XXX: bool or integer pub typed_keys: Option, pub version: Option, -*/ +} // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html #[derive(Serialize, Deserialize, Debug)] @@ -77,8 +74,6 @@ pub struct SearchBody { pub _source: Option, // XXX: bool, string, or object pub terminate_after: Option, pub timeout: Option, // string is "time units" - - // not enumerated in direct docs, but seems to be allowed? } #[derive(Serialize, Deserialize, Debug)] -- cgit v1.2.3