mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 05:18:58 +00:00
(index) Reduce fetch size to improve timeout characteristics
This commit is contained in:
parent
87aa869338
commit
f4eeef145e
@ -336,10 +336,10 @@ public class IndexGrpcService extends IndexApiGrpc.IndexApiImplBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void executeSearch() {
|
private void executeSearch() {
|
||||||
final LongArrayList results = new LongArrayList(512);
|
final LongArrayList results = new LongArrayList(64);
|
||||||
|
|
||||||
// These queries are different indices for one subquery
|
// These queries are different indices for one subquery
|
||||||
final LongQueryBuffer buffer = new LongQueryBuffer(512);
|
final LongQueryBuffer buffer = new LongQueryBuffer(64);
|
||||||
|
|
||||||
while (query.hasMore() && budget.hasTimeLeft())
|
while (query.hasMore() && budget.hasTimeLeft())
|
||||||
{
|
{
|
||||||
@ -350,7 +350,7 @@ public class IndexGrpcService extends IndexApiGrpc.IndexApiImplBase {
|
|||||||
results.add(buffer.data.get(i));
|
results.add(buffer.data.get(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (results.size() >= 512) {
|
if (results.size() >= 64) {
|
||||||
enqueueResults(new CombinedDocIdList(results));
|
enqueueResults(new CombinedDocIdList(results));
|
||||||
results.clear();
|
results.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user