You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by si...@apache.org on 2009/07/01 18:50:47 UTC

svn commit: r790262 - in /lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation: CollationKeyAnalyzer.java CollationKeyFilter.java ICUCollationKeyAnalyzer.java ICUCollationKeyFilter.java

Author: simonw
Date: Wed Jul  1 16:50:47 2009
New Revision: 790262

URL: http://svn.apache.org/viewvc?rev=790262&view=rev
Log:
LUCENE-1719: Add javadoc notes about ICUCollationKeyFilter's advantages over CollationKeyFilter (Steven Row via Simon Willnauer)

Modified:
    lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java
    lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyFilter.java
    lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java
    lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyFilter.java

Modified: lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java?rev=790262&r1=790261&r2=790262&view=diff
==============================================================================
--- lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java (original)
+++ lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java Wed Jul  1 16:50:47 2009
@@ -59,12 +59,17 @@
  *   </li>
  * </ol> 
  * <p>
- *   NB 1: {@link ICUCollationKeyAnalyzer} uses ICU4J's Collator, which makes 
+ *   {@link ICUCollationKeyAnalyzer} uses ICU4J's Collator, which makes 
  *   its version available, thus allowing collation to be versioned
- *   independently from the JVM.
+ *   independently from the JVM.  ICUCollationKeyAnalyzer is also significantly
+ *   faster and generates significantly shorter keys than CollationKeyAnalyzer.
+ *   See <a href="http://site.icu-project.org/charts/collation-icu4j-sun"
+ *   >http://site.icu-project.org/charts/collation-icu4j-sun</a> for key
+ *   generation timing and key length comparisons between ICU4J and
+ *   java.text.Collator over several languages.
  * </p>
  * <p>
- *   NB 2: CollationKeys generated by java.text.Collators are not compatible
+ *   CollationKeys generated by java.text.Collators are not compatible
  *   with those those generated by ICU Collators.  Specifically, if you use 
  *   CollationKeyAnalyzer to generate index terms, do not use
  *   ICUCollationKeyAnalyzer on the query side, or vice versa.

Modified: lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyFilter.java?rev=790262&r1=790261&r2=790262&view=diff
==============================================================================
--- lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyFilter.java (original)
+++ lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyFilter.java Wed Jul  1 16:50:47 2009
@@ -57,12 +57,17 @@
  *   </li>
  * </ol> 
  * <p>
- *   NB 1: {@link ICUCollationKeyFilter} uses ICU4J's Collator, which makes its
+ *   {@link ICUCollationKeyFilter} uses ICU4J's Collator, which makes its
  *   version available, thus allowing collation to be versioned independently
- *   from the JVM.
+ *   from the JVM.  ICUCollationKeyFilter is also significantly faster and
+ *   generates significantly shorter keys than CollationKeyFilter.  See
+ *   <a href="http://site.icu-project.org/charts/collation-icu4j-sun"
+ *   >http://site.icu-project.org/charts/collation-icu4j-sun</a> for key
+ *   generation timing and key length comparisons between ICU4J and
+ *   java.text.Collator over several languages.
  * </p>
  * <p>
- *   NB 2: CollationKeys generated by java.text.Collators are not compatible
+ *   CollationKeys generated by java.text.Collators are not compatible
  *   with those those generated by ICU Collators.  Specifically, if you use 
  *   CollationKeyFilter to generate index terms, do not use
  *   {@link ICUCollationKeyFilter} on the query side, or vice versa.

Modified: lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java?rev=790262&r1=790261&r2=790262&view=diff
==============================================================================
--- lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java (original)
+++ lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java Wed Jul  1 16:50:47 2009
@@ -55,11 +55,19 @@
  *   </li>
  * </ol> 
  * <p>
- *   NB: CollationKeys generated by ICU Collators are not compatible with those
+ *   CollationKeys generated by ICU Collators are not compatible with those
  *   generated by java.text.Collators.  Specifically, if you use 
  *   ICUCollationKeyAnalyzer to generate index terms, do not use 
  *   {@link CollationKeyAnalyzer} on the query side, or vice versa.
  * </p>
+ * <p>
+ *   ICUCollationKeyAnalyzer is significantly faster and generates significantly
+ *   shorter keys than CollationKeyAnalyzer.  See
+ *   <a href="http://site.icu-project.org/charts/collation-icu4j-sun"
+ *   >http://site.icu-project.org/charts/collation-icu4j-sun</a> for key
+ *   generation timing and key length comparisons between ICU4J and
+ *   java.text.Collator over several languages.
+ * </p>
  */
 public class ICUCollationKeyAnalyzer extends Analyzer {
   private Collator collator;

Modified: lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyFilter.java?rev=790262&r1=790261&r2=790262&view=diff
==============================================================================
--- lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyFilter.java (original)
+++ lucene/java/trunk/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyFilter.java Wed Jul  1 16:50:47 2009
@@ -55,11 +55,19 @@
  *   </li>
  * </ol> 
  * <p>
- *   NB: CollationKeys generated by ICU Collators are not compatible with those
+ *   CollationKeys generated by ICU Collators are not compatible with those
  *   generated by java.text.Collators.  Specifically, if you use 
  *   ICUCollationKeyFilter to generate index terms, do not use 
  *   {@link CollationKeyFilter} on the query side, or vice versa.
  * </p>
+ * <p>
+ *   ICUCollationKeyFilter is significantly faster and generates significantly
+ *   shorter keys than CollationKeyFilter.  See
+ *   <a href="http://site.icu-project.org/charts/collation-icu4j-sun"
+ *   >http://site.icu-project.org/charts/collation-icu4j-sun</a> for key
+ *   generation timing and key length comparisons between ICU4J and
+ *   java.text.Collator over several languages.
+ * </p>
  */
 public class ICUCollationKeyFilter extends TokenFilter {
   private Collator collator = null;