Consider using index template to define "global" analyzers for all indexes created from this template.
Yes we mentioned that on HipChat, but it's only half a solution: it does no good when you add a new analyzer on existing indexes (indexes are not updated when templates are updated). We could use templates, but given index creation is automated on our side, that doesn't bring any specific advantage compared to simply copying the same settings on each and every index. It may be useful when users create indexes themselves, though.
For the integration tests, we could use David's receipt as defined in this blog http://david.pilato.fr/blog/2016/10/18/elasticsearch-real-integration-tests-updated-for-ga/ Or we could use what we do for WildFly which is essentially also a unzipping and starting of the app server. Anything I'm missing Yoann Rodière ?
David's solution does require to have a zipped distribution I think, so we'd essentially automate the ZIP download and unzipping, then use David's solution. We could also wait for the elasticsearch-maven-plugin to be updated (it seems they intend to), but that may take some time.
Consider throwing an exception upon optimize call?
I just checked, and the "elasticsearch.refresh_after_write" option uses different mechanisms, so the optimize API is really only used when calling SearchFactory.optimize(). So yes, I guess it's an option. Note that adding support for the ForceRefresh API is quite easy (https://github.com/searchbox-io/Jest/pull/408), but then we'd have to wait for a new release. |