1
1
mirror of https://github.com/MarginaliaSearch/MarginaliaSearch.git synced 2025-10-05 21:22:39 +02:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Viktor Lofgren
97a6780ea3 (search) Add debug logging for specific query 2025-05-16 23:41:35 +02:00
Viktor Lofgren
eb634beec8 (search) Add debug logging for specific query 2025-05-16 23:34:03 +02:00
Viktor Lofgren
269ebd1654 Revert "(query) Add debug logging for specific query"
This reverts commit 39ce40bfeb.
2025-05-16 23:29:06 +02:00
Viktor Lofgren
39ce40bfeb (query) Add debug logging for specific query 2025-05-16 23:23:53 +02:00
Viktor Lofgren
c187b2e1c1 (search) Re-enable clustering 2025-05-16 23:20:16 +02:00
Viktor Lofgren
42eaa4588b (search) Disable clustering for a moment 2025-05-16 23:17:01 +02:00
Viktor Lofgren
4f40a5fbeb (search) Reduce log spam 2025-05-16 23:15:07 +02:00
Viktor Lofgren
3f3d42bc01 (search) Re-enable deduplication 2025-05-16 23:14:54 +02:00
4 changed files with 30 additions and 9 deletions

View File

@@ -112,6 +112,13 @@ public class SearchOperator {
.selectStrategy(queryResponse)
.clusterResults(queryResults, 25);
if (queryParams.humanQuery().equals("slackware linux")) {
logger.info("Query response: {}", queryResponse.results().subList(0, 5));
logger.info("Query results: {}", queryResults.subList(0, 5));
logger.info("Clustered results: {}", clusteredResults.subList(0, 5));
}
// Log the query and results
logger.info(queryMarker, "Human terms: {}", Strings.join(queryResponse.searchTermsHuman(), ','));

View File

@@ -23,7 +23,7 @@ public class SearchResultClusterer {
}
/** No clustering, just return the results as is */
private static List<ClusteredUrlDetails> noOp(List<UrlDetails> results, int total) {
public static List<ClusteredUrlDetails> noOp(List<UrlDetails> results, int total) {
if (results.isEmpty())
return List.of();

View File

@@ -85,7 +85,6 @@ public class SearchService extends JoobyService {
String emptySvg = "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>";
jooby.get("/site/{domain}/favicon", ctx -> {
String domain = ctx.path("domain").value();
logger.info("Finding icon for domain {}", domain);
try {
DbDomainQueries.DomainIdWithNode domainIdWithNode = domainQueries.getDomainIdWithNode(new EdgeDomain(domain));
var faviconMaybe = faviconClient.getFavicon(domain, domainIdWithNode.nodeAffinity());

View File

@@ -25,13 +25,28 @@ public class UrlDeduplicator {
}
public boolean shouldRemove(DecoratedSearchResultItem details) {
// if (!deduplicateOnSuperficialHash(details))
// return true;
// if (!deduplicateOnLSH(details))
// return true;
if (!limitResultsPerDomain(details))
return true;
if (details.url.domain.topDomain.equals("slackware.com")) {
if (!deduplicateOnSuperficialHash(details)) {
logger.info("Rejecting on superficial hash " + details.url);
return true;
}
if (!deduplicateOnLSH(details)) {
logger.info("Rejecting on LSH for " + details.url);
return true;
}
if (!limitResultsPerDomain(details)) {
logger.info("Rejecting on limitResultsPerDomain for " + details.url);
return true;
}
}
else {
if (!deduplicateOnSuperficialHash(details))
return true;
if (!deduplicateOnLSH(details))
return true;
if (!limitResultsPerDomain(details))
return true;
}
return false;
}