YousefED / ElasticUI

AngularJS directives for Elasticsearch
http://www.elasticui.com
Other
526 stars 138 forks source link

checkbox does not filter #105

Open xiangli729 opened 7 years ago

xiangli729 commented 7 years ago

Hi,

Thanks for making such a valuable and great toolkit available, which helps a lot!

I am new to ElasticUI, and try to build a simple front-end based on this tool. On top of the demo, the search works well for me. The eui-singleselect and eui-checklist can also list the key values with the right number of instances for each key value. But when I clicked the checkbox, it does not filter the list of instances by checking the box, which gives the following error:

angular.js:8380 
POST http://localhost:9200/index/_search?size=10&from=0 400 (Bad Request)

I have tried another version of eui-checklist as follows, which gives the same error:

<ul class="nav nav-list" eui-aggregation="ejs.TermsAggregation('aggname').field('field_name').size(100)">
    <li ng-repeat="bucket in aggResult.buckets">
        <label class="checkbox" eui-filter="ejs.TermsFilter('field_name', bucket.key)">
            <input type="checkbox" ng-model="filter.enabled">
            {{bucket.key}} ({{bucket.doc_count}})
        </label>
    </li>
</ul>

Could anyone help me on this?

Appreciate much!

Best, xiangli729