fix(all): Fix search on others bots than boot.

This commit is contained in:
Rodrigo Rodriguez 2023-09-10 13:39:07 -03:00
parent 73a9ffefdb
commit 32601d2460

View file

@ -289,8 +289,10 @@ export class KBService implements IGBKBService {
}
}
let key = instance.searchKey ? instance.searchKey:
const key = instance.searchKey ? instance.searchKey:
GBServer.globals.minBoot.instance.searchKey;
const host = instance.searchHost ? instance.searchHost :
GBServer.globals.minBoot.instance.searchHost;
// No direct match found, so Search is used.
@ -306,7 +308,7 @@ export class KBService implements IGBKBService {
subject4: string;
}
const client = new SearchClient<any>('https://' + instance.searchHost, 'azuresql-index', {
const client = new SearchClient<any>('https://' + host, 'azuresql-index', {
key: key
} as any);