Use types in elasticsearch for differend haystack indexes.

Fixes #503, thanks to @davedash for previous patch on which this one is
based.