Skip to content

web search done right

clamp title to 2 lines on mobile

Mikkel Denkere63d6dc2e64d
diff --git a/frontend/src/routes/search/Result.svelte b/frontend/src/routes/search/Result.svelte
index d0165b6a..a3e1879e 100644
--- a/frontend/src/routes/search/Result.svelte
+++ b/frontend/src/routes/search/Result.svelte
@@ -44,7 +44,7 @@
<span class="flex flex-col-reverse">
<h3 class="flex">
<ResultLink
- _class="title truncate max-w-[calc(100%-30px)] text-xl font-medium text-link visited:text-link-visited hover:underline"
+ _class="title line-clamp-2 md:line-clamp-1 max-w-[calc(100%-30px)] text-xl font-medium text-link visited:text-link-visited hover:underline"
title={webpage.title}
href={webpage.url}
{resultIndex}
@@ -97,7 +97,7 @@
answers={webpage.richSnippet.answers}
/>
{:else}
- <div class="line-clamp-3">
+ <div class="line-clamp-4 md:line-clamp-3">
<div class="inline">
<span id="snippet-text" class="snippet-text">
{#if webpage.likelyHasAds && $markPagesWithAdsStore && webpage.likelyHasPaywall && $markPagesWithPaywallStore}
diff --git a/ltr/linear_model.py b/ltr/linear_model.py
index bd18bba6..48ee757e 100644
--- a/ltr/linear_model.py
+++ b/ltr/linear_model.py
@@ -8,7 +8,7 @@ from pprint import pprint
MAX_WEIGHT = 10
-NUM_QUERIES_FOR_EVAL = 40
+NUM_QUERIES_FOR_EVAL = 80
con = sqlite3.connect("data/auto-ranking-annotation.sqlite")
cur = con.cursor()
@@ -131,7 +131,7 @@ result = differential_evolution(
optim,
bounds,
maxiter=100,
- popsize=1,
+ popsize=5,
disp=False,
polish=False,
callback=callback,