TODO: see what other requests the default python and javascript client libraries use ## basics - config: TOML, env, args - filter requests by method and endpoint - filter query parameters - parse request bodies (queries) - method/body for denied requests - async streaming responses - minimize tokio feature flags factoring: - validate query method (method, path, query, body) ## general endpoints - ping (?) - basic info GET / (?) - scroll POST /_search/scroll - clear scroll DELETE /_search/scroll ## per-index endpoints - basic info; mapping (?) - count GET //_count - get document GET //_doc/<_id> HEAD //_doc/<_id> GET //_source/<_id> HEAD //_source/<_id> - search GET //_search POST //_search 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 - query_string - simple_query_string term-level: - range gt, gte, lt, lte: str or number - term value: str or number - terms (array of str or number) - wildcard value (str) boost (float, optional) rewrite (str, optional) - exists field (str) - ids values (array of str) - match_all boost (float, optional) - match_none boost (float, optional) TODO: - terms_set - span queries - fuzzy (configurable) ## additional stuff - HTTP content-encoding: gzip - content-type header; always JSON? - https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html