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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
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
x create full request objects in tests
x "completeness" over all the below query types and parameters
x real fatcat+scholar request tests
x minimize tokio feature flags
x package/release
x generate .deb file
x Makefile
x manpage
x example config
x README
x push git repo
x version flag ("--version")
x deb: include systemd unit file, and register it (?)
x Dockerfile
x systemd unit file
x add config (/etc/) to debian package config file list
x more methods/endpoints
x CORS headers on many more responses
x OPTIONS, HEAD for ping
x HEAD eg, for ping
x _mapping
x index bare
x headers
x enable CORS headers in the proxy itself?
x HEAD requests
x 'Via' header
x gitlab ci
x error handling
x refactor error categories
x return correct status code
x pretty-print errors better
x return a proper error when upstream is unavailable
- play with https://search.qa.fatcat.wiki and observable (javascript)
- update README
=> summary
=> installation + configuration
=> development
- bump version
- push to crates.io
- tests
x "get", "_doc", "_source"
x parse error
x unsupported query type
- parse example_config.toml
- nginx example config
- histogram agg interval 0.0 (?)
- suggestions in search queries
https://www.elastic.co/guide/en/elasticsearch/reference/7.9/search-suggesters.html
- config
x all indices as "unsafe_mode"
=> distinct file schema from config object (eg, no "Option" in object)
=> ProxyConfig in Box? less cloning?
- refactor unwrap() into error handling
- IPv6?
parse method+path (index) -> which validation method
method+path+params+body -> status, upstream request
## general endpoints
- ping
(?)
x basic info
GET /
x scroll
POST /_search/scroll
x clear scroll
DELETE /_search/scroll
## per-index endpoints
- basic info; mapping
GET /<index>
GET /<index>/_mapping
x count
GET /<index>/_count
x get document
GET /<index>/_doc/<_id>
GET /<index>/_source/<_id>
x search
GET /<index>/_search
POST /<index>/_search
later:
- multi-get (`_mget`)
- multi-search (`_msearch`)
## query types
compound:
x bool
x boosting
x constant_score
filter (query)
boost (float, optional)
fulltext:
x match
<field>
(bare str allowed)
query (str)
x match_phrase
<field>
(bare str allowed)
value (str)
x multi_match
x query_string
- simple_query_string
term-level:
x exists
field (str)
x ids
values (array of str)
x prefix
x range
<field>
gt, gte, lt, lte: str or number
- NOT regex (?)
x term
<field>
value: str or number
x terms
does not support "lookup" from other indices
<field>
(array of str or number)
x wildcard
<field>
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
x 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' (?)
- https://github.com/elastic/search-ui
|