]> source.dussan.org Git - gitblit.git/commitdiff
Display fewer content fragments for blobs
authorJames Moger <james.moger@gitblit.com>
Tue, 20 Mar 2012 03:11:11 +0000 (23:11 -0400)
committerJames Moger <james.moger@gitblit.com>
Tue, 20 Mar 2012 03:11:11 +0000 (23:11 -0400)
src/com/gitblit/LuceneExecutor.java

index db604a0a90f706ddffcdb222bbae3fd27a4a96af..29a8569d526b522b22f5beed649ea3f531962267 100644 (file)
@@ -1124,7 +1124,7 @@ public class LuceneExecutor implements Runnable {
                Highlighter highlighter = new Highlighter(formatter, scorer);           \r
                highlighter.setTextFragmenter(fragmenter);\r
                \r
-               String [] fragments = highlighter.getBestFragments(analyzer, "content", content, 5);\r
+               String [] fragments = highlighter.getBestFragments(analyzer, "content", content, 3);\r
                if (ArrayUtils.isEmpty(fragments)) {\r
                        if (SearchObjectType.blob  == result.type) {\r
                                return "";\r