[backend/elasticsearch][xs]: auto lower case terms in term filters as ES needs them to be lowercase.

This commit is contained in:
Rufus Pollock 2012-06-16 17:03:53 +01:00
parent 81167e39fe
commit 262bb95376

View File

@ -120,7 +120,7 @@ this.recline.Backend.ElasticSearch = this.recline.Backend.ElasticSearch || {};
var out = {};
out[filter.type] = {}
if (filter.type === 'term') {
out.term[filter.field] = filter.term;
out.term[filter.field] = filter.term.toLowerCase();
} else if (filter.type === 'geo_distance') {
out.geo_distance[filter.field] = filter.point;
out.geo_distance.distance = filter.distance;