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 61db4291..17fa6256 100644 --- a/core/src/main/groovy/com/muwire/core/search/SearchIndex.groovy +++ b/core/src/main/groovy/com/muwire/core/search/SearchIndex.groovy @@ -33,9 +33,9 @@ class SearchIndex { private static String[] split(String source) { source = source.replaceAll(Constants.SPLIT_PATTERN, " ").toLowerCase() - source.split(" ") + String [] split = source.split(" ") def rv = [] - source.each { if (it.length() > 0) rv << it } + split.each { if (it.length() > 0) rv << it } rv.toArray(new String[0]) }