Implemented external field support for terms query https://github.com/elasticsearch/elasticsearch/issues/2674