From 60252267d52f2cab0b17104311ff43c58d45fa8f Mon Sep 17 00:00:00 2001 From: wafflecoffee Date: Tue, 6 Sep 2022 00:39:50 -0400 Subject: [PATCH] Add slug to searchable attributes and add project_id to facets (#447) Fixes #358 Adding project_id to the facets would allow the inclusion or exclusion of individual projects from search. For example, this would allow people to be able to exclude projects which they've already followed or are not interested in. My personal vision for this is to merge the [followed projects page](https://modrinth.com/settings/follows) into search itself. --- src/search/indexing/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/search/indexing/mod.rs b/src/search/indexing/mod.rs index a845e5b6..f208d637 100644 --- a/src/search/indexing/mod.rs +++ b/src/search/indexing/mod.rs @@ -210,7 +210,7 @@ const DEFAULT_DISPLAYED_ATTRIBUTES: &[&str] = &[ ]; const DEFAULT_SEARCHABLE_ATTRIBUTES: &[&str] = - &["title", "description", "author"]; + &["title", "description", "author", "slug"]; const DEFAULT_ATTRIBUTES_FOR_FACETING: &[&str] = &[ "categories", @@ -225,6 +225,7 @@ const DEFAULT_ATTRIBUTES_FOR_FACETING: &[&str] = &[ "title", "date_created", "date_modified", + "project_id", ]; const DEFAULT_SORTABLE_ATTRIBUTES: &[&str] =