diff --git a/core/src/main/groovy/com/muwire/core/content/Matcher.groovy b/core/src/main/groovy/com/muwire/core/content/Matcher.groovy index 98214855..62561730 100644 --- a/core/src/main/groovy/com/muwire/core/content/Matcher.groovy +++ b/core/src/main/groovy/com/muwire/core/content/Matcher.groovy @@ -4,6 +4,7 @@ import com.muwire.core.search.QueryEvent abstract class Matcher { final List matches = Collections.synchronizedList(new ArrayList<>()) + final Set uuids = new HashSet<>() protected abstract boolean match(List searchTerms); @@ -11,7 +12,7 @@ abstract class Matcher { public void process(QueryEvent qe) { def terms = qe.searchEvent.searchTerms - if (match(terms)) { + if (match(terms) && uuids.add(qe.searchEvent.uuid)) { long now = System.currentTimeMillis() matches << new Match(persona : qe.originator, keywords : terms, timestamp : now) }