As requested in D17384: Support multiple fulltext search clusters with 'cluster.search' config,
this separates out the substantial changes to the elastic
index and query building. These changes will need to land before D17384 simply
because I am unable to test D17384 without these changes. Or more to the point,
elasticsearch support in the upstream is badly broken when using recent (or
even relatively outdated) versions of elasticsearch, so these changes unbreak
it to the point of usability in order to build further improvements on top.
I will rebase D17384 on top of this change and update that revision shortly.