From d0bb38c765274b1c889a429616d4da2b478cdbd2 Mon Sep 17 00:00:00 2001 From: Plamen Totev Date: Sun, 12 Jul 2015 18:08:14 +0300 Subject: Fix tags not properly indexed in Lucene All tags that reference to particular object are stored in a list within a map. There is a if statement that inits empty list when there are not references to the current object yet, but the boolean expression checks for the wrong value. --- src/main/java/com/gitblit/service/LuceneService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/gitblit/service/LuceneService.java') diff --git a/src/main/java/com/gitblit/service/LuceneService.java b/src/main/java/com/gitblit/service/LuceneService.java index 285ea8d7..097a39b2 100644 --- a/src/main/java/com/gitblit/service/LuceneService.java +++ b/src/main/java/com/gitblit/service/LuceneService.java @@ -437,7 +437,7 @@ public class LuceneService implements Runnable { // skip non-annotated tags continue; } - if (!tags.containsKey(tag.getObjectId().getName())) { + if (!tags.containsKey(tag.getReferencedObjectId().getName())) { tags.put(tag.getReferencedObjectId().getName(), new ArrayList()); } tags.get(tag.getReferencedObjectId().getName()).add(tag.displayName); -- cgit v1.2.3