]> source.dussan.org Git - gitblit.git/commitdiff
Fix tags not properly indexed in Lucene 291/head
authorPlamen Totev <plamentotev@users.noreply.github.com>
Sun, 12 Jul 2015 15:08:14 +0000 (18:08 +0300)
committerPlamen Totev <plamentotev@users.noreply.github.com>
Sun, 12 Jul 2015 15:08:14 +0000 (18:08 +0300)
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

index 285ea8d70737d6eb962dcd7b3177a241c616a1b1..097a39b2f3e11750a180154f6cfe2385c19a3889 100644 (file)
@@ -437,7 +437,7 @@ public class LuceneService implements Runnable {
                                        // skip non-annotated tags\r
                                        continue;\r
                                }\r
-                               if (!tags.containsKey(tag.getObjectId().getName())) {\r
+                               if (!tags.containsKey(tag.getReferencedObjectId().getName())) {\r
                                        tags.put(tag.getReferencedObjectId().getName(), new ArrayList<String>());\r
                                }\r
                                tags.get(tag.getReferencedObjectId().getName()).add(tag.displayName);\r