aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs11
1 files 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<SearchBody>,
}
-/*
-
-URL query parameters:
-
+pub struct UrlQueryParams {
pub allow_no_indices: Option<bool>,
pub allow_partial_search_results: Option<bool>,
pub batched_reduce_size: Option<u32>,
@@ -26,7 +23,7 @@ URL query parameters:
pub max_concurrent_shard_requests: Option<u32>,
pub pre_filter_shard_size: Option<u32>,
pub preference: Option<String>,
- pub q: Option<String>
+ pub q: Option<String>,
pub request_cache: Option<bool>,
pub rest_total_hits_as_int: Option<bool>,
pub routing: Option<String>,
@@ -48,7 +45,7 @@ URL query parameters:
pub track_total_hits: Option<bool>, // XXX: bool or integer
pub typed_keys: Option<bool>,
pub version: Option<bool>,
-*/
+}
// 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<bool>, // XXX: bool, string, or object
pub terminate_after: Option<u32>,
pub timeout: Option<String>, // string is "time units"
-
- // not enumerated in direct docs, but seems to be allowed?
}
#[derive(Serialize, Deserialize, Debug)]