Closed arkanovicz closed 3 years ago
Here is the trace of the HTTP exchange without this patch:
Query:
POST /ponymail/mbox/_search HTTP/1.1 Connection: close, TE TE: trailers User-Agent: LuaSocket 3.0-rc1 Content-Type: application/x-www-form-urlencoded Host: elasticsearch:9200 Content-Length: 200
{"size":0,"aggs":{"listnames":{"terms":{"size":500000,"field":"list_raw"},"aggs":{"privacy":{"terms":{"field":"private"},"aggs":{"recent":{"range":{"ranges":[{"from":"now-90d"}],"field":"date"}}}}}}}}
Response:
HTTP/1.1 406 Not Acceptable content-type: application/json; charset=UTF-8 content-length: 97
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}
Hum... and there seems to be more problems further in the definition of the mappings, see removal of types in 7+.
Since the needed reenginering requires some design choices (several indices or a custom type field?), I'll revert my setup to a 5.x ES version. But I'd be glad to help if needed.
This version of pony mail is only guaranteed to work with 5.x and below. For 6/7/8.x, we're working on a new bundle called Foal - https://github.com/apache/incubator-ponymail-foal . Should be ready for use soon.
Ah ah, I'll stop submitting PR here, then! Nice to know.
Against a recent version of ElasticSearch (7.9.3), I had to fix Ponymail http queries to add the proper
Content-Type: application/json
header.