(search) Correct accidental regression of the Vintage filter

This commit is contained in:
Viktor Lofgren 2024-02-15 18:13:34 +01:00
parent 752e677555
commit 16526d283c
2 changed files with 11 additions and 2 deletions

View File

@ -21,6 +21,7 @@ public class SearchQueryParamFactory {
userParams.js().addTacitTerms(prototype);
userParams.adtech().addTacitTerms(prototype);
return new QueryParams(
userParams.query(),
null,
@ -29,8 +30,8 @@ public class SearchQueryParamFactory {
prototype.searchTermsPriority,
prototype.searchTermsAdvice,
profile.getQualityLimit(),
SpecificationLimit.none(),
profile.getSizeLimit(),
profile.getYearLimit(),
userParams.yearLimit(),
SpecificationLimit.none(),
SpecificationLimit.none(),
List.of(),

View File

@ -3,6 +3,7 @@ package nu.marginalia.search.command;
import nu.marginalia.WebsiteUrl;
import nu.marginalia.index.client.model.results.ResultRankingParameters;
import nu.marginalia.index.query.limit.QueryStrategy;
import nu.marginalia.index.query.limit.SpecificationLimit;
import nu.marginalia.search.model.SearchProfile;
import java.net.URLEncoder;
@ -71,4 +72,11 @@ public record SearchParameters(String query,
return QueryStrategy.AUTO;
}
public SpecificationLimit yearLimit() {
if (recent == RECENT)
return SpecificationLimit.greaterThan(2018);
return profile.getYearLimit();
}
}