From 64a58cbf3b23a56d7cc0ea09a8f4e42ee5f46ce9 Mon Sep 17 00:00:00 2001 From: Emma Lejeck Date: Sun, 13 Oct 2024 20:46:03 -0700 Subject: [PATCH] Remove descriptions from search indices --- app/indices/concerns/typesense_media_index.rb | 2 -- app/indices/typesense_anime_index.rb | 1 - app/indices/typesense_manga_index.rb | 1 - app/services/anime_search_service.rb | 3 +-- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/indices/concerns/typesense_media_index.rb b/app/indices/concerns/typesense_media_index.rb index 1140421ad..6de4af577 100644 --- a/app/indices/concerns/typesense_media_index.rb +++ b/app/indices/concerns/typesense_media_index.rb @@ -18,8 +18,6 @@ module TypesenseMediaIndex field 'alternative_titles', type: 'string[]' field 'titles', type: 'object' field 'titles\..*', type: 'string' - field 'descriptions', type: 'object' - field 'descriptions\..*', type: 'string' # Start and end dates field 'start_date', type: 'object', optional: true diff --git a/app/indices/typesense_anime_index.rb b/app/indices/typesense_anime_index.rb index 057486808..7da4e0a30 100644 --- a/app/indices/typesense_anime_index.rb +++ b/app/indices/typesense_anime_index.rb @@ -63,7 +63,6 @@ def index(ids) translated_title: titles.translated, alternative_titles: titles.alternatives.compact, titles: titles.localized, - descriptions: anime.description, start_date: format_date(anime.start_date), end_date: format_date(anime.end_date), start_cour: { diff --git a/app/indices/typesense_manga_index.rb b/app/indices/typesense_manga_index.rb index dc8aece40..a5883d014 100644 --- a/app/indices/typesense_manga_index.rb +++ b/app/indices/typesense_manga_index.rb @@ -48,7 +48,6 @@ def index(ids) translated_title: titles.translated, alternative_titles: titles.alternatives.compact, titles: titles.localized, - descriptions: manga.description, start_date: format_date(manga.start_date), end_date: format_date(manga.end_date), status: manga.status, diff --git a/app/services/anime_search_service.rb b/app/services/anime_search_service.rb index 0b3ce43f1..27470e038 100644 --- a/app/services/anime_search_service.rb +++ b/app/services/anime_search_service.rb @@ -37,8 +37,7 @@ def query query_by: { 'canonical_title' => 100, 'titles.*' => 90, - 'alternative_titles' => 90, - 'descriptions.*' => 80 + 'alternative_titles' => 90 } ) query = apply_filters_to(query)