Improved search index

This commit is contained in:
Eduard Urbach 2017-07-02 00:49:05 +02:00
parent 9950adbf9e
commit 3309e5fb63

View File

@ -40,6 +40,10 @@ func updateAnimeIndex() {
animeSearchIndex.TextToID[strings.ToLower(anime.Title.Japanese)] = anime.ID animeSearchIndex.TextToID[strings.ToLower(anime.Title.Japanese)] = anime.ID
} }
if anime.Title.Canonical != "" {
animeSearchIndex.TextToID[strings.ToLower(anime.Title.Canonical)] = anime.ID
}
for _, synonym := range anime.Title.Synonyms { for _, synonym := range anime.Title.Synonyms {
synonym = strings.ToLower(synonym) synonym = strings.ToLower(synonym)