Convert text to match for Elasticsearch 1.0 (bug 971801)