diff --git a/elastic-fed/distribution/src/bin/havenask-command/general_search_starter.py b/elastic-fed/distribution/src/bin/havenask-command/general_search_starter.py index b5e0fc42..d5c51bae 100755 --- a/elastic-fed/distribution/src/bin/havenask-command/general_search_starter.py +++ b/elastic-fed/distribution/src/bin/havenask-command/general_search_starter.py @@ -165,6 +165,7 @@ def addOptions(self): self.parser.add_option('', '--enablePublishTableTopoInfo', action='store_true', dest='enablePublishTableTopoInfo', default=False) self.parser.add_option('', '--force_tablet_load', action='store_true', dest='forceTabletLoad', default=False) self.parser.add_option('', '--qrsLoadTarget', action='store_true', dest='qrsLoadTarget', default=False) + self.parser.add_option('', '--searcherLoadTarget', action='store_true', dest='searcherLoadTarget', default=False) def parseParams(self, optionList): self.optionList = optionList @@ -247,6 +248,8 @@ def initMember(self, options): else: self.offlineConfigPath = os.path.join(self.offlineConfigPath, str(tableVersions[-1])) + self.qrsLoadTarget = options.qrsLoadTarget + self.searcherLoadTarget = options.searcherLoadTarget self.httpBindPort = options.httpBindPort self.arpcBindPort = options.arpcBindPort self.grpcBindPort = options.grpcBindPort @@ -387,7 +390,7 @@ def start_once(self): if len(zoneNames) > 1: return -1, ("", "local access mode only support one zone, now zone names " + str(zoneNames), -1) - if not self.enableLocalAccess: + if not self.enableLocalAccess and self.searcherLoadTarget: ret = self.loadSearcherTarget(searcherTargetInfos, terminator.left_time()) if ret != 0: return ret, ("", "load searcher target failed", -1)