1
1
mirror of https://github.com/MarginaliaSearch/MarginaliaSearch.git synced 2025-10-06 07:32:38 +02:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Viktor Lofgren
838a5626ec (index) Reduce query buffer size 2025-07-27 21:42:04 +02:00
Viktor Lofgren
6b426209c7 (index) Restore threshold for work stealing in query execution 2025-07-27 21:41:46 +02:00
Viktor Lofgren
452b5731d9 (index) Lower threshold for work stealing in query execution 2025-07-27 21:35:11 +02:00
Viktor Lofgren
c91cf49630 (search) Disable scribe.rip substitution
It does not appear to work well
2025-07-27 19:40:58 +02:00
Viktor Lofgren
8503030f18 (search) Fix rare exception in scribe.rip substitution 2025-07-27 19:38:52 +02:00
Viktor Lofgren
744f7d3ef7 (search) Fix rare exception in scribe.rip substitution 2025-07-27 19:34:03 +02:00
Viktor Lofgren
215e12afe9 (index) Shrink query buffer size 2025-07-27 17:33:46 +02:00
Viktor Lofgren
2716bce918 (index) Adjust timeout logic for evaluation 2025-07-27 17:28:34 +02:00
4 changed files with 27 additions and 20 deletions

View File

@@ -20,6 +20,7 @@ import nu.marginalia.index.model.SearchParameters;
import nu.marginalia.index.model.SearchTerms;
import nu.marginalia.index.positions.PositionsFileReader;
import nu.marginalia.index.query.IndexQuery;
import nu.marginalia.index.query.IndexSearchBudget;
import nu.marginalia.index.results.DomainRankingOverrides;
import nu.marginalia.index.results.IndexResultRankingService;
import nu.marginalia.index.results.model.ids.CombinedDocIdList;
@@ -162,10 +163,10 @@ public class PerfTestMain {
int sum = 0;
Instant runEndTime = Instant.now().plus(warmupTime);
int iter;
IndexSearchBudget budget = new IndexSearchBudget(10000);
for (iter = 0;; iter++) {
sum += rankingService.rankResults(rankingContext, docIds, false).size();
sum += rankingService.rankResults(rankingContext, budget, docIds, false).size();
if ((iter % 100) == 0 && Instant.now().isAfter(runEndTime)) {
break;
}
@@ -178,7 +179,7 @@ public class PerfTestMain {
List<Double> times = new ArrayList<>();
for (iter = 0;; iter++) {
long start = System.nanoTime();
sum2 += rankingService.rankResults(rankingContext, docIds, false).size();
sum2 += rankingService.rankResults(rankingContext, budget, docIds, false).size();
long end = System.nanoTime();
times.add((end - start)/1_000_000.);

View File

@@ -76,7 +76,7 @@ public class IndexQueryExecution {
}
private void lookup(IndexQuery query) {
final LongQueryBuffer buffer = new LongQueryBuffer(8192);
final LongQueryBuffer buffer = new LongQueryBuffer(512);
try {
while (query.hasMore() && budget.hasTimeLeft()) {

View File

@@ -199,16 +199,19 @@ public class SearchOperator {
return new EdgeUrl("https", new EdgeDomain("breezewiki.com"), null, "/" + subdomain + path.substring(wikiIndex), null);
}
}
/*
else if (topdomain.equals("medium.com")) {
int slashIndex = path.indexOf("/", 1);
if (slashIndex >= 0) {
if (!subdomain.isBlank()) {
return new EdgeUrl("https", new EdgeDomain("scribe.rip"), null, path, null);
}
else {
String article = path.substring(path.indexOf("/", 1));
String article = path.substring(slashIndex);
return new EdgeUrl("https", new EdgeDomain("scribe.rip"), null, article, null);
}
}
}*/
return url;
}

View File

@@ -230,16 +230,19 @@ public class SearchOperator {
return new EdgeUrl("https", new EdgeDomain("breezewiki.com"), null, "/" + subdomain + path.substring(wikiIndex), null);
}
}
/*
else if (topdomain.equals("medium.com")) {
int slashIndex = path.indexOf("/", 1);
if (slashIndex >= 0) {
if (!subdomain.isBlank()) {
return new EdgeUrl("https", new EdgeDomain("scribe.rip"), null, path, null);
}
else {
String article = path.substring(path.indexOf("/", 1));
String article = path.substring(slashIndex);
return new EdgeUrl("https", new EdgeDomain("scribe.rip"), null, article, null);
}
}
}*/
return url;
}