lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r960353 - in /lucene/dev/branches/branch_3x/lucene/contrib: CHANGES.txt highlighter/ highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragmentsBuilder.java highlighter/src/test/
Date Sun, 04 Jul 2010 16:10:25 GMT
Author: koji
Date: Sun Jul  4 16:10:24 2010
New Revision: 960353

URL: http://svn.apache.org/viewvc?rev=960353&view=rev
Log:
LUCENE-2524: FastVectorHighlighter: use mod for getting colored tag

Modified:
    lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt
    lucene/dev/branches/branch_3x/lucene/contrib/highlighter/   (props changed)
    lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragmentsBuilder.java
    lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/test/   (props changed)

Modified: lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt?rev=960353&r1=960352&r2=960353&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt Sun Jul  4 16:10:24 2010
@@ -79,6 +79,9 @@ Bug fixes
  * LUCENE-2404: Fix bugs with position increment and empty tokens in ThaiWordFilter.
    For matchVersion >= 3.1 the filter also no longer lowercases. ThaiAnalyzer
    will use a separate LowerCaseFilter instead. (Uwe Schindler, Robert Muir)
+
+* LUCENE-2524: FastVectorHighlighter: use mod for getting colored tag.
+  (Koji Sekiguchi)
    
 API Changes
 

Propchange: lucene/dev/branches/branch_3x/lucene/contrib/highlighter/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Sun Jul  4 16:10:24 2010
@@ -0,0 +1,7 @@
+/lucene/dev/trunk/lucene/contrib/highlighter:931298,931337,931502,932129-932131,932163,932304,932369,932374,932398,932417,932541,932576,932587,932698,932731-932749,932752,932773,932795,932828,932856-932857,932862,932864,932878,932963,933541-933575,933598,933613,933679,933879,934339,934954,935014-935048,935065,935186-935513,935521-935522,935553-935962,936522,936544,936605,936657-936726,937039,937360,938582-938646,938989,939111,939611,939649,940433,940447,940451-940452,940666,940699,940730,940878-940892,940994,941270,941363,942166,942235,942288,942676,942719,943142,943493,943931,945057,945090,945130,945245,945343,945420,946139,946330,946338,946599,948011,948082,948429,949288,949311,949445,949976,949997,950008,950042,950458,950613,951126,951355,951397,951521,953628,955547,955613,955615,956715,957465,957520,957707,960349
+/lucene/java/branches/flex_1458/contrib/highlighter:924791,924850,930201
+/lucene/java/branches/lucene_2_4/contrib/highlighter:748824
+/lucene/java/branches/lucene_2_9/contrib/highlighter:817269-818600,825998,829134,829816,829881,831036,896850,909334,948516
+/lucene/java/branches/lucene_2_9_back_compat_tests/contrib/highlighter:818601-821336
+/lucene/java/branches/lucene_3_0/contrib/highlighter:880793,896906
+/lucene/java/trunk/contrib/highlighter:924483-925561

Modified: lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragmentsBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragmentsBuilder.java?rev=960353&r1=960352&r2=960353&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragmentsBuilder.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/BaseFragmentsBuilder.java
Sun Jul  4 16:10:24 2010
@@ -36,7 +36,10 @@ public abstract class BaseFragmentsBuild
     "<b style=\"background:yellow\">", "<b style=\"background:lawngreen\">",
"<b style=\"background:aquamarine\">",
     "<b style=\"background:magenta\">", "<b style=\"background:palegreen\">",
"<b style=\"background:coral\">",
     "<b style=\"background:wheat\">", "<b style=\"background:khaki\">", "<b
style=\"background:lime\">",
-    "<b style=\"background:deepskyblue\">"
+    "<b style=\"background:deepskyblue\">", "<b style=\"background:deeppink\">",
"<b style=\"background:salmon\">",
+    "<b style=\"background:peachpuff\">", "<b style=\"background:violet\">",
"<b style=\"background:mediumpurple\">",
+    "<b style=\"background:palegoldenrod\">", "<b style=\"background:darkkhaki\">",
"<b style=\"background:springgreen\">",
+    "<b style=\"background:turquoise\">", "<b style=\"background:powderblue\">"
   };
   public static final String[] COLORED_POST_TAGS = { "</b>" };
   
@@ -145,10 +148,12 @@ public abstract class BaseFragmentsBuild
   }
   
   protected String getPreTag( int num ){
-    return preTags.length > num ? preTags[num] : preTags[0];
+    int n = num % preTags.length;
+    return preTags[n];
   }
   
   protected String getPostTag( int num ){
-    return postTags.length > num ? postTags[num] : postTags[0];
+    int n = num % postTags.length;
+    return postTags[n];
   }
 }

Propchange: lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jul  4 16:10:24 2010
@@ -1,4 +1,4 @@
-/lucene/dev/trunk/lucene/contrib/highlighter/src/test:931298,931337,931502,932129-932131,932163,932304,932369,932374,932398,932417,932541,932576,932587,932698,932731-932749,932752,932773,932795,932828,932856-932857,932862,932864,932878,932963,933541-933575,933598,933613,933679,933879,934339,934954,935014-935048,935065,935186-935513,935521-935522,935553-935962,936522,936544,936605,936657-936726,937039,937360,938582-938646,938989,939111,939611,939649,940433,940447,940451-940452,940666,940699,940730,940878-940892,940994,941270,941363,942166,942235,942288,942676,942719,943142,943493,943931,945057,945090,945130,945245,945343,945420,946139,946330,946338,946599,948011,948082,948429,949288,949311,949445,949976,949997,950008,950042,950458,950613,951126,951355,951397,951521,953628,955547,955613,955615,956715,957465,957520,957707
+/lucene/dev/trunk/lucene/contrib/highlighter/src/test:931298,931337,931502,932129-932131,932163,932304,932369,932374,932398,932417,932541,932576,932587,932698,932731-932749,932752,932773,932795,932828,932856-932857,932862,932864,932878,932963,933541-933575,933598,933613,933679,933879,934339,934954,935014-935048,935065,935186-935513,935521-935522,935553-935962,936522,936544,936605,936657-936726,937039,937360,938582-938646,938989,939111,939611,939649,940433,940447,940451-940452,940666,940699,940730,940878-940892,940994,941270,941363,942166,942235,942288,942676,942719,943142,943493,943931,945057,945090,945130,945245,945343,945420,946139,946330,946338,946599,948011,948082,948429,949288,949311,949445,949976,949997,950008,950042,950458,950613,951126,951355,951397,951521,953628,955547,955613,955615,956715,957465,957520,957707,960349
 /lucene/java/branches/flex_1458/contrib/highlighter/src/test:924791,924850,930201
 /lucene/java/branches/lucene_2_4/contrib/highlighter/src/test:748824
 /lucene/java/branches/lucene_2_9/contrib/highlighter/src/test:817269-818600,825998,826775,829134,829816,829881,831036,896850,909334,948516



Mime
View raw message