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