Hello,
I have bitbucket server 6.6.1, since the update from last 5.* I see that that the search doesn't work. I'm not sure that it was working before.
In the test button (from server setting page) I have no issue, but when I do the search I got error. In the log I see
2019-09-24 13:55:37,158 ERROR [http-nio-7990-exec-3] XXXXX @1PVT03Ax835x1052x0 1mjaanx XXXXXXX "POST /rest/search/latest/search HTTP/1.1" c.a.b.i.s.search.rest.SearchResource Unexpected response code from Elasticsearch: 404
the bitbucket server work back a proxy in a subpath