lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1451579 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/facet/ lucene/facet/src/java/org/apache/lucene/facet/params/ lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/
Date Fri, 01 Mar 2013 12:53:01 GMT
Author: mikemccand
Date: Fri Mar  1 12:53:00 2013
New Revision: 1451579

URL: http://svn.apache.org/r1451579
Log:
LUCENE-4806: change facet delim character to use 3 bytes instead of 1 (in UTF-8)

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_4x/lucene/facet/   (props changed)
    lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/params/FacetIndexingParams.java
    lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java
    lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java

Modified: lucene/dev/branches/branch_4x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/CHANGES.txt?rev=1451579&r1=1451578&r2=1451579&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/lucene/CHANGES.txt Fri Mar  1 12:53:00 2013
@@ -64,6 +64,11 @@ Changes in backwards compatibility polic
 * LUCENE-4748: A FacetRequest on a non-existent field now returns an
   empty FacetResult instead of skipping it.  (Shai Erera, Mike McCandless)
 
+* LUCENE-4806: The default category delimiter character was changed
+  from U+F749 to U+001F, since the latter uses 1 byte vs 3 bytes for
+  the former.  Existing facet indices must be reindexed.  (Robert
+  Muir, Shai Erera, Mike McCandless)
+
 Optimizations
 
 * LUCENE-4687: BloomFilterPostingsFormat now lazily initializes delegate

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/params/FacetIndexingParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/params/FacetIndexingParams.java?rev=1451579&r1=1451578&r2=1451579&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/params/FacetIndexingParams.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/params/FacetIndexingParams.java
Fri Mar  1 12:53:00 2013
@@ -58,7 +58,7 @@ public class FacetIndexingParams {
    * make sure that you return a character that's not found in any path
    * component.
    */
-  public static final char DEFAULT_FACET_DELIM_CHAR = '\uF749';
+  public static final char DEFAULT_FACET_DELIM_CHAR = '\u001F';
   
   private final int partitionSize = Integer.MAX_VALUE;
 

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java?rev=1451579&r1=1451578&r2=1451579&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java
Fri Mar  1 12:53:00 2013
@@ -36,9 +36,10 @@ abstract class Consts {
    * <P>
    * Originally, we used \uFFFE, officially a "unicode noncharacter" (invalid
    * unicode character) for this purpose. Recently, we switched to the
-   * "private-use" character \uF749.
+   * "private-use" character \uF749.  Even more recently, we
+   * switched to \U001F (INFORMATION_SEPARATOR).
    */
   //static final char DEFAULT_DELIMITER = '\uFFFE';
-  static final char DEFAULT_DELIMITER = '\uF749';
-  
+  //static final char DEFAULT_DELIMITER = '\uF749';
+  static final char DEFAULT_DELIMITER = '\u001F';
 }

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java?rev=1451579&r1=1451578&r2=1451579&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
Fri Mar  1 12:53:00 2013
@@ -803,7 +803,7 @@ public class DirectoryTaxonomyWriter imp
         te = terms.iterator(te);
         while (te.next() != null) {
           String value = te.term().utf8ToString();
-          CategoryPath cp = new CategoryPath(value, Consts.DEFAULT_DELIMITER);
+          CategoryPath cp = new CategoryPath(value, delimiter);
           final int ordinal = addCategory(cp);
           docs = te.docs(null, docs, DocsEnum.FLAG_NONE);
           ordinalMap.addMapping(docs.nextDoc() + base, ordinal);



Mime
View raw message