Skip to content

Commit

Permalink
Remove descriptions from search indices
Browse files Browse the repository at this point in the history
  • Loading branch information
NuckChorris committed Oct 14, 2024
1 parent 082ae9b commit 64a58cb
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions app/indices/concerns/typesense_media_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion app/indices/typesense_anime_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 0 additions & 1 deletion app/indices/typesense_manga_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions app/services/anime_search_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 64a58cb

Please sign in to comment.