Skip to content

Commit

Permalink
feat: optimize query DSL
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <[email protected]>
  • Loading branch information
SuZhou-Joe committed Aug 9, 2023
1 parent 3217788 commit a93c2ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 2 additions & 0 deletions src/core/public/workspace/workspaces_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export class WorkspacesClient {
}
}
);

this.init();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,22 +240,14 @@ export class WorkspaceSavedObjectsClientWrapper {
bool: {
should: [
{
bool: {
must: {
term: {
type: 'config',
},
},
term: {
type: 'config',
},
},
queryDSL.query,
{
bool: {
should: permittedWorkspaceIds?.map((item) => ({
terms: {
workspaces: [item],
},
})),
terms: {
workspaces: permittedWorkspaceIds,
},
},
],
Expand Down

0 comments on commit a93c2ac

Please sign in to comment.