note about function copied from clj-elasticsearch