From 8f3b5aea8d1801fd46f7d851304bad1d7d2148c2 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sun, 10 Nov 2019 05:14:31 +0000 Subject: [PATCH] store lowercases in search index --- core/src/main/groovy/com/muwire/core/search/SearchIndex.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/groovy/com/muwire/core/search/SearchIndex.groovy b/core/src/main/groovy/com/muwire/core/search/SearchIndex.groovy index 3e87a762..2767b819 100644 --- a/core/src/main/groovy/com/muwire/core/search/SearchIndex.groovy +++ b/core/src/main/groovy/com/muwire/core/search/SearchIndex.groovy @@ -39,10 +39,11 @@ class SearchIndex { split.each { if (it.length() > 0) rv << it } // then just by ' ' - source.split(' ').each { if (it.length() > 0) rv << it } + source.toLowerCase().split(' ').each { if (it.length() > 0) rv << it } // and add original string rv << source + rv << source.toLowerCase() rv.toArray(new String[0]) }