fix(all): Fix search on others bots than boot.
This commit is contained in:
parent
f86f711774
commit
6a7c49f827
2 changed files with 4 additions and 2 deletions
|
@ -178,9 +178,10 @@ export class GBAdminService implements IGBAdminService {
|
|||
}
|
||||
public static async rebuildIndexPackageCommand(min: GBMinInstance, deployer: GBDeployer) {
|
||||
const service = await AzureDeployerService.createInstance(deployer);
|
||||
const searchIndex = min.instance.searchIndex ? min.instance.searchIndex : GBServer.globals.minBoot.instance.searchIndex;
|
||||
await deployer.rebuildIndex(
|
||||
min.instance,
|
||||
service.getKBSearchSchema(min.instance.searchIndex)
|
||||
service.getKBSearchSchema(searchIndex)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1031,7 +1031,8 @@ export class KBService implements IGBKBService {
|
|||
await this.importKbPackage(min, localPath, p, instance);
|
||||
GBDeployer.mountGBKBAssets(packageName, min.botId, localPath);
|
||||
const service = await AzureDeployerService.createInstance(deployer);
|
||||
await deployer.rebuildIndex(instance, service.getKBSearchSchema(instance.searchIndex));
|
||||
const searchIndex = instance.searchIndex ? instance.searchIndex : GBServer.globals.minBoot.instance.searchIndex;
|
||||
await deployer.rebuildIndex(instance, service.getKBSearchSchema(searchIndex));
|
||||
|
||||
min['groupCache'] = await KBService.getGroupReplies(instance.instanceId);
|
||||
await KBService.RefreshNER(min);
|
||||
|
|
Loading…
Add table
Reference in a new issue