x filter requests by method and endpoint x parse query parameters (typed) x re-serialize query parameters into upstream request URL x method/body for denied requests - create full request objects in tests - bad request tests (parse error, disabled query types, etc) - "completeness" over all the below query types and parameters - real fatcat+scholar request tests - minimize tokio feature flags - see what other requests the default python and javascript client libraries use - put ProxyConfig in Box? less cloning? - config: TOML, env, args => separate parse schema from options schema => example file - refactor unwrap() into error handling - package/release => generate .deb file => Makefile => manpage => example config? => README => push git repo - test in with https://search.qa.fatcat.wiki and observable (javascript) parse method+path (index) -> which validation method method+path+params+body -> status, upstream request ## general endpoints - ping (?) - basic info GET / (?) - scroll POST /_search/scroll - clear scroll DELETE /_search/scroll ## per-index endpoints - basic info; mapping GET //_mapping - count GET //_count - get document GET //_doc/<_id> HEAD //_doc/<_id> GET //_source/<_id> HEAD //_source/<_id> - search GET //_search POST //_search - mapping later: - multi-get (`_mget`) - multi-search (`_msearch`) ## query types compound: - bool - boosting - constant_score filter (query) boost (float, optional) fulltext: - match (bare str allowed) query (str) - match_phrase (bare str allowed) value (str) - multi_match x query_string - simple_query_string term-level: x exists field (str) x ids values (array of str) x prefix x range gt, gte, lt, lte: str or number - NOT regex (?) x term value: str or number x terms does not support "lookup" from other indices (array of str or number) x wildcard value (str) boost (float, optional) rewrite (str, optional) x match_all boost (float, optional) x match_none boost (float, optional) TODO: - terms_set - span queries - fuzzy (configurable) ## additional stuff - headers - HTTP content-encoding: gzip - content-type header; always JSON? - set "Via" header in responses (indicating proxy version/context) - https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html - logging - switch from 'url' to 'percent-encoding' (?)