diff --git a/hello-jina2/customIndexer/executor.py b/hello-jina2/customIndexer/executor.py index e1b65eb..14efa82 100644 --- a/hello-jina2/customIndexer/executor.py +++ b/hello-jina2/customIndexer/executor.py @@ -224,7 +224,9 @@ def getRange(self, maxItem, result: list, thod = 0.1, ignore_range: list[int] = rightIndex = i else: break - return leftIndex, rightIndex, d_result[maxIndex] + if (rightIndex - leftIndex) > 60: + return self.getRange(maxItem, result, thod/2, ignore_range) + return leftIndex, max(rightIndex, leftIndex + 10), d_result[maxIndex] def score(self, image_features, text_features):