From de46187216bffe06961df155d0d25d75fa255a2b Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 28 Jun 2017 02:51:11 +0200 Subject: [PATCH] Improved search index --- jobs/search-index/main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jobs/search-index/main.go b/jobs/search-index/main.go index 0033b956..e1ef2c6f 100644 --- a/jobs/search-index/main.go +++ b/jobs/search-index/main.go @@ -28,8 +28,12 @@ func updateAnimeIndex() { } for anime := range animeStream { - if anime.Title.Canonical != "" { - animeSearchIndex.TextToID[strings.ToLower(anime.Title.Canonical)] = anime.ID + if anime.Title.Romaji != "" { + animeSearchIndex.TextToID[strings.ToLower(anime.Title.Romaji)] = anime.ID + } + + if anime.Title.English != "" { + animeSearchIndex.TextToID[strings.ToLower(anime.Title.English)] = anime.ID } if anime.Title.Japanese != "" {