This should be moved onto the `ElasticSearch` service. I'm also a little unclear as to what it is returning. The `/api/graphs/<graphId>/search/mapping` doesn't return a unique field, it returns a complex map describing all the indices in elasticsearch. Instead, you should add a `ElasticSearch.mapping` method that this `ElasticSearch.searchUniqueField` calls, which uses `$then` to process the mapping into whatever this `searchUniqueField` does :)