dncrews / angular-elastic-builder

This is an Angular.js directive for building an Elasticsearch query. You just give it the fields and can generate a query for it.
Other
83 stars 38 forks source link

filter can not be applied #11

Open oliver-luschnitz opened 8 years ago

oliver-luschnitz commented 8 years ago

setting $scope.elasticQueryBuilder.query and $scope.elasticQueryBuilder.needsUpdate = true does not work.

I changed file dist/angular-elastic-builder.js, line 478 from

prev[choice] = truthy === (~group[key][obj.field].indexOf(choice));

to

prev[choice] = truthy === (group[key][obj.field].indexOf(choice) >= 0);

to fix it.