Fix limits
This commit is contained in:
parent
385e29aee5
commit
c3be27c15b
|
@ -515,12 +515,10 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
|
|||
allowOnlyQueryParsingCollectorStreamSearcher.search(indexSearcher, luceneQuery);
|
||||
totalHitsCountSink.tryEmitValue(0L);
|
||||
} else {
|
||||
if (limit > Integer.MAX_VALUE) {
|
||||
throw new NumberIsTooLargeException(limit, Integer.MAX_VALUE, true);
|
||||
}
|
||||
int boundedLimit = Math.max(0, limit > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) limit);
|
||||
streamSearcher.search(indexSearcher,
|
||||
luceneQuery,
|
||||
(int) limit,
|
||||
boundedLimit,
|
||||
luceneSort,
|
||||
luceneScoreMode,
|
||||
minCompetitiveScore,
|
||||
|
|
|
@ -319,7 +319,7 @@ public class LLLocalMultiLuceneIndex implements LLLuceneIndex {
|
|||
.getT1()
|
||||
.distributedSearch(tuple.getT2().orElse(null),
|
||||
query,
|
||||
Integer.MAX_VALUE,
|
||||
limit,
|
||||
sort,
|
||||
scoreMode,
|
||||
minCompetitiveScore,
|
||||
|
|
Loading…
Reference in New Issue
Block a user