Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async search(query){
let sharedQuery = this.searchkit.accessors.buildSharedQuery(new ImmutableQuery())
this.options.include = this.createRegexQuery(query)
let searchQuery = super.buildOwnQuery(sharedQuery)
.setSize(0)
let results = await this.searchkit.transport.search(
searchQuery.getJSON())
return get(results, [
"aggregations", this.uuid, this.options.field, "buckets"
], [])
}
}
async search(query) {
let sharedQuery = this.searchkit.accessors.buildSharedQuery(new ImmutableQuery())
this.options.include = createRegexQuery(query)
let searchQuery = super.buildOwnQuery(sharedQuery)
.setSize(0)
let results = await this.searchkit.transport.search(
searchQuery.getJSON())
return get(results, [
"aggregations", this.uuid, this.options.field, "buckets"
], [])
}
}
async search(query = "") {
let sharedQuery = new ImmutableQuery()
.setSize(0)
let searchQuery = reduce(this.sources, (searchQuery, source) => {
return source.search(searchQuery, query)
}, sharedQuery)
this.results = await this.transport.search(searchQuery.getJSON())
return this.getGroupedResults()
}