From c6e7abcf01d61bbc3bf658135def151d9866ba46 Mon Sep 17 00:00:00 2001 From: Michael Lewis Date: Tue, 7 May 2024 13:17:38 +0100 Subject: [PATCH] Fixed #147: Don't return CSS files as results --- src/web/content/dynamic/searchmysite/solr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/web/content/dynamic/searchmysite/solr.py b/src/web/content/dynamic/searchmysite/solr.py index 9df2ad9..7b5d1ae 100644 --- a/src/web/content/dynamic/searchmysite/solr.py +++ b/src/web/content/dynamic/searchmysite/solr.py @@ -12,7 +12,8 @@ default_sort_search = "score desc" default_sort_browse = "date_domain_added desc" default_sort_newest = "published_date desc" -mandatory_filter_queries_search = ["public:true", "!content_type:*xml", "!content_type:application*", "!content_type:binary*"] +#mandatory_filter_queries_search = ["public:true", "!content_type:*xml", "!content_type:text/css", "!content_type:application*", "!content_type:binary*"] +mandatory_filter_queries_search = ["public:true", "(content_type:text/html OR content_type:text/plain)"] mandatory_filter_queries_browse = ["public:true", "is_home:true"] mandatory_filter_queries_newest = mandatory_filter_queries_search + ["contains_adverts:false", "published_date:[NOW-30YEARS TO NOW]", "is_home:false"] # to ensure no future dates or infeasibly far past dates, and no home pages split_text = '--split-here--'