You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2011/02/15 10:16:34 UTC

svn commit: r1070818 - in /lucene/dev/branches/branch_3x/lucene/contrib: ./ analyzers/common/src/java/org/apache/lucene/analysis/shingle/ analyzers/common/src/test/org/apache/lucene/analysis/shingle/

Author: uschindler
Date: Tue Feb 15 09:16:32 2011
New Revision: 1070818

URL: http://svn.apache.org/viewvc?rev=1070818&view=rev
Log:
LUCENE-2920: Deprecated ShingleMatrixFilter as it is unmaintained and does not work with custom Attributes or custom payload encoders

Modified:
    lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt
    lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/shingle/ShingleMatrixFilter.java
    lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java

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=1070818&r1=1070817&r2=1070818&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt Tue Feb 15 09:16:32 2011
@@ -150,6 +150,9 @@ API Changes
  * LUCENE-2830: Use StringBuilder instead of StringBuffer across Benchmark, and
    remove the StringBuffer HtmlParser.parse() variant. (Shai Erera)
    
+ * LUCENE-2920: Deprecated ShingleMatrixFilter as it is unmaintained and does
+   not work with custom Attributes or custom payload encoders.  (Uwe Schindler)
+   
 New features
 
  * LUCENE-2500: Added DirectIOLinuxDirectory, a Linux-specific

Modified: lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/shingle/ShingleMatrixFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/shingle/ShingleMatrixFilter.java?rev=1070818&r1=1070817&r2=1070818&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/shingle/ShingleMatrixFilter.java (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/shingle/ShingleMatrixFilter.java Tue Feb 15 09:16:32 2011
@@ -112,9 +112,12 @@ import org.apache.lucene.index.Payload;
  * based on the weights of the tokens from the input stream, output shingle size, etc.
  * See {@link #calculateShingleWeight(org.apache.lucene.analysis.Token, java.util.List, int, java.util.List, java.util.List)}.
  * <p/>
- * <b>NOTE:</b> This filter might not behave correctly if used with custom Attributes, i.e. Attributes other than
- * the ones located in org.apache.lucene.analysis.tokenattributes.
+ * @deprecated Will be removed in Lucene 4.0. This filter is unmaintained and might not behave
+ * correctly if used with custom Attributes, i.e. Attributes other than
+ * the ones located in <code>org.apache.lucene.analysis.tokenattributes</code>. It also uses
+ * hardcoded payload encoders which makes it not easily adaptable to other use-cases.
  */
+@Deprecated
 public final class ShingleMatrixFilter extends TokenStream {
 
   public static Character defaultSpacerCharacter = Character.valueOf('_');

Modified: lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java?rev=1070818&r1=1070817&r2=1070818&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/shingle/TestShingleMatrixFilter.java Tue Feb 15 09:16:32 2011
@@ -37,6 +37,7 @@ import org.apache.lucene.analysis.tokena
 import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
 import org.apache.lucene.analysis.tokenattributes.TypeAttribute;
 
+@Deprecated
 public class TestShingleMatrixFilter extends BaseTokenStreamTestCase {
 
   public void testIterator() throws IOException {