From edf9aa2c23882d5c8768e7961fb9a8145b120fc7 Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Sun, 17 Dec 2023 13:59:54 +0100 Subject: [PATCH] (*) Rename EdgeDomain$domain into topDomain This variable had a very confusing name, and was dangerously easy to use in the wrong place with the result of getting something that only works as expected half the time. Ideally this class needs an overhaul, the assumptions it makes about domain names aren't great. --- .../sideload/stackexchange/StackexchangeSideloader.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/processes/converting-process/src/main/java/nu/marginalia/converting/sideload/stackexchange/StackexchangeSideloader.java b/code/processes/converting-process/src/main/java/nu/marginalia/converting/sideload/stackexchange/StackexchangeSideloader.java index bf0344ec..a39bdab8 100644 --- a/code/processes/converting-process/src/main/java/nu/marginalia/converting/sideload/stackexchange/StackexchangeSideloader.java +++ b/code/processes/converting-process/src/main/java/nu/marginalia/converting/sideload/stackexchange/StackexchangeSideloader.java @@ -115,8 +115,9 @@ public class StackexchangeSideloader implements SideloadSource { ret.words = keywordExtractor.extractKeywords(dld, url); ret.words.addAllSyntheticTerms(List.of( "site:" + domainName, - "site:" + url.domain.domain, - url.domain.domain + "site:" + url.domain.topDomain, + url.domain.topDomain, + domainName )); if (!post.tags().isBlank()) {