-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
Description
to reproduce:
const data = [{ "boolean": true, "string": "true" }]
const itemsjs = require('itemsjs')(data, {
aggregations: {
boolean: {},
string: {}
}
});
const aggs = itemsjs.search({
filters: {
boolean: [true],
string: ["true"]
}
}).data.aggregations
console.log(aggs.boolean.buckets, aggs.string.buckets)
//[{ key: 'true', doc_count: 1, selected: false }][{ key: 'true', doc_count: 1, selected: true }]`
for comparison there 2 fields : boolean and string . Both are aggregations and search made under both of them
in first case we have "selected:false" for boolean ( looks like a bug) and "selected:true" for string ( its OK)