mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
This reverts commit 64a03fafd4
.
- We should discuss how to solve this within the UI layer first.
This commit is contained in:
parent
740fa072db
commit
9074396473
2 changed files with 2 additions and 17 deletions
|
@ -37,7 +37,6 @@ uiModules.get('apps/management')
|
|||
const getData = function (filter) {
|
||||
const services = registry.all().map(function (obj) {
|
||||
const service = $injector.get(obj.service);
|
||||
|
||||
return service.find(filter).then(function (data) {
|
||||
return {
|
||||
service: service,
|
||||
|
|
|
@ -78,12 +78,11 @@ export class SavedObjectLoader {
|
|||
*/
|
||||
find(searchString, size = 100) {
|
||||
let body;
|
||||
|
||||
if (searchString) {
|
||||
body = {
|
||||
query: {
|
||||
query_string: {
|
||||
query: /^\w+$/.test(searchString) ? `${searchString}*` : searchString,
|
||||
simple_query_string: {
|
||||
query: searchString + '*',
|
||||
fields: ['title^3', 'description'],
|
||||
default_operator: 'AND'
|
||||
}
|
||||
|
@ -99,19 +98,6 @@ export class SavedObjectLoader {
|
|||
body,
|
||||
size
|
||||
})
|
||||
.catch(err => {
|
||||
// attempt to mimic simple_query_string, swallow formatting error
|
||||
if (err.statusCode === 400) {
|
||||
return {
|
||||
hits: {
|
||||
total: 0,
|
||||
hits: [],
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
throw err;
|
||||
})
|
||||
.then((resp) => {
|
||||
return {
|
||||
total: resp.hits.total,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue