Skip to content

Commit

Permalink
feat: pass index when query #10
Browse files Browse the repository at this point in the history
Signed-off-by: seven <[email protected]>
  • Loading branch information
Blankll committed Dec 29, 2023
1 parent b122704 commit 0d7fbe1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/store/connectionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const useConnectionStore = defineStore('connectionStore', {
async searchQDSL(index: string | undefined, qdsl: string) {
const client = loadHttpClient(this.established?.host, this.established?.port);

Check failure on line 95 in src/store/connectionStore.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest, 18.x)

Argument of type 'string | undefined' is not assignable to parameter of type 'string'.

Check failure on line 95 in src/store/connectionStore.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 18.x)

Argument of type 'string | undefined' is not assignable to parameter of type 'string'.

Check failure on line 95 in src/store/connectionStore.ts

View workflow job for this annotation

GitHub Actions / build (windows-latest, 18.x)

Argument of type 'string | undefined' is not assignable to parameter of type 'string'.

return client.post(index ? '/${index}/_search' : '/_search', undefined, JSON.parse(qdsl));
return client.post(index ? `/${index}/_search` : '/_search', undefined, JSON.parse(qdsl));
},
},
});
2 changes: 1 addition & 1 deletion src/views/editor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const executeQueryAction = async (
return;
}
const data = await searchQDSL(undefined, payload);
const data = await searchQDSL(established.value.activeIndex.index, payload);
// eslint-disable-next-line no-console
console.log(`data ${JSON.stringify({ data })}`);
} catch (err) {
Expand Down

0 comments on commit 0d7fbe1

Please sign in to comment.