fix(all): Fix search on others bots than boot.
This commit is contained in:
parent
77920f640d
commit
73a9ffefdb
2 changed files with 9 additions and 3 deletions
|
@ -105,7 +105,10 @@ export class GBDeployer implements IGBDeployer {
|
|||
*/
|
||||
public static async internalGetDriveClient(min: GBMinInstance) {
|
||||
let token;
|
||||
if (min['cacheToken']) {
|
||||
|
||||
// TODO: Add expiration logic.
|
||||
|
||||
if (min['cacheToken'] && null) {
|
||||
return min['cacheToken'];
|
||||
} else {
|
||||
|
||||
|
|
|
@ -289,9 +289,12 @@ export class KBService implements IGBKBService {
|
|||
}
|
||||
}
|
||||
|
||||
let key = instance.searchKey ? instance.searchKey:
|
||||
GBServer.globals.minBoot.instance.searchKey;
|
||||
|
||||
// No direct match found, so Search is used.
|
||||
|
||||
if (instance.searchKey !== null && GBConfigService.get('STORAGE_DIALECT') === 'mssql') {
|
||||
if (key !== null && GBConfigService.get('STORAGE_DIALECT') === 'mssql') {
|
||||
interface SearchResults {
|
||||
instanceId: number;
|
||||
questionId: number;
|
||||
|
@ -304,7 +307,7 @@ export class KBService implements IGBKBService {
|
|||
}
|
||||
|
||||
const client = new SearchClient<any>('https://' + instance.searchHost, 'azuresql-index', {
|
||||
key: instance.searchKey
|
||||
key: key
|
||||
} as any);
|
||||
|
||||
const results = await client.search(query, {
|
||||
|
|
Loading…
Add table
Reference in a new issue