summaryrefslogtreecommitdiffstats
path: root/plan.txt
blob: 9ab837ab9a213774650691dc983d1206917d1ba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105

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 /<index>/_count
- get document
    GET /<index>/_doc/<_id>
    HEAD /<index>/_doc/<_id>
    GET /<index>/_source/<_id>
    HEAD /<index>/_source/<_id>
- search
    GET /<index>/_search
    POST /<index>/_search

later:

- multi-get (`_mget`)
- multi-search (`_msearch`)

## query types

compound:
- bool
- boosting
- constant_score
    filter (query)
    boost (float, optional)

fulltext:
- match
    <field>
        (bare str allowed)
        query (str)
- match_phrase
    <field>
        (bare str allowed)
        value (str)
- multi_match
- query_string
- simple_query_string

term-level:
- range
    <field>
        gt, gte, lt, lte: str or number
- term
    <field>
        value: str or number
- terms
    <field>
        (array of str or number)
- wildcard
    <field>
        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