From 18d2b56563c9df538c310e3229a96fa4fd3b5cfb Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Thu, 20 Jun 2019 17:57:36 +0100 Subject: [PATCH] fix indexing --- .../src/main/groovy/com/muwire/core/search/SearchIndex.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]) }