From e5e38762547a500a7bc547cc1721eb17dc88f3bb Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Wed, 6 Dec 2023 16:02:43 +1300 Subject: [PATCH] Solr managed schema sucks --- src/search-provider-solr.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/search-provider-solr.rkt b/src/search-provider-solr.rkt index fbd77deb..ed9fb7b0 100644 --- a/src/search-provider-solr.rkt +++ b/src/search-provider-solr.rkt @@ -46,7 +46,8 @@ (for/list ([doc (jp "/response/docs" json)]) (define id (jp "/id" doc)) (define len (jp "/len" doc)) - (define title (jp "/title" doc)) + (define title (let ([t (jp "/title" doc)]) + (if (list? t) (car t) t))) (define page-path (page-title->path title)) (define kb (exact->inexact (/ (round (/ len 100)) 10))) ; divide by 1000 and round to nearest 0.1 (define words (* (round (/ len 60)) 10)) ; divide by 6 and round to nearest 10