lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: svn commit: r830815 [1/2] - in /lucene/java/branches/flex_1458_2_9_back_compat_tests: ./ src/java/org/apache/lucene/analysis/ src/java/org/apache/lucene/analysis/standard/ src/java/org/apache/lucene/queryParser/ src/java/org/apache/lucene/util/ src/tes...
Date Thu, 29 Oct 2009 04:45:54 GMT
The corresponding piece to this will come eventually - I've got it done,
but my laptop is - uh - *HOT* right now and so I can't run the tests.
Turns out the fan that I wanted to die is causing me even more pain in
the after life. I'll try and get it committed before too long. At worst
I'll commit and someone else can run the tests :)

markrmiller@apache.org wrote:
> Author: markrmiller
> Date: Thu Oct 29 01:00:08 2009
> New Revision: 830815
>
> URL: http://svn.apache.org/viewvc?rev=830815&view=rev
> Log:
> merge up to r830375
>
> Added:
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/util/TestParameterToEnumBW.java
>       - copied unchanged from r830375, lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/util/TestParameterToEnumBW.java
> Removed:
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestStressSort.java
> Modified:
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/   (props changed)
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/StopAnalyzer.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/QueryParser.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/QueryParser.jj
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/util/Constants.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestDemo.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSearch.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSearchForDuplicates.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSnapshotDeletionPolicy.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestAnalyzers.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java   (props changed)
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStandardAnalyzer.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStopFilter.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestTeeSinkTokenFilter.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestBinaryDocument.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestDateTools.java   (props changed)
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestDocument.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestNumberTools.java   (props changed)
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java   (props changed)
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestCheckIndex.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDirectoryReader.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDocumentWriter.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReader.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterLockRelease.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterMerging.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestNorms.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestOmitTf.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestParallelReader.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/queryParser/TestMultiAnalyzer.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/queryParser/TestQueryParser.java   (contents, props changed)
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestBoolean2.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestBooleanOr.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestDateSort.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestExplanations.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestFuzzyQuery.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestMatchAllDocsQuery.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestMultiSearcher.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestMultiSearcherRanking.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestNot.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestPhraseQuery.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestPositionIncrement.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestQueryWrapperFilter.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestSimilarity.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestSimpleExplanations.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermVectors.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestWildcard.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/function/FunctionTestSetup.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestNearSpansOrdered.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestSpans.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestSpansAdvanced.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestSpansAdvanced2.java
>     lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/store/TestWindowsMMap.java
>
> Propchange: lucene/java/branches/flex_1458_2_9_back_compat_tests/
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Thu Oct 29 01:00:08 2009
> @@ -1,3 +1,3 @@
>  /lucene/java/branches/lucene_2_4:748824
> -/lucene/java/branches/lucene_2_9_back_compat_tests:824919-825624
> +/lucene/java/branches/lucene_2_9_back_compat_tests:824919-830375
>  /lucene/java/trunk:821379
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/StopAnalyzer.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/StopAnalyzer.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/StopAnalyzer.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/StopAnalyzer.java Thu Oct 29 01:00:08 2009
> @@ -23,13 +23,15 @@
>  import java.util.Arrays;
>  import java.util.Set;
>  
> +import org.apache.lucene.util.Version;
> +
>  /** Filters {@link LetterTokenizer} with {@link LowerCaseFilter} and {@link StopFilter}. */
>  
>  public final class StopAnalyzer extends Analyzer {
> -  private final Set/*<String>*/ stopWords;
> +  private Set/*<String>*/ stopWords;
>    // @deprecated
> -  private final boolean useDefaultStopPositionIncrement;
> -  private final boolean enablePositionIncrements;
> +  private boolean useDefaultStopPositionIncrement;
> +  private boolean enablePositionIncrements;
>  
>    /** An array containing some common English words that are not usually useful
>      for searching. 
> @@ -68,6 +70,10 @@
>      enablePositionIncrements = false;
>    }
>  
> +  public StopAnalyzer(Version matchVersion) {
> +    // stub
> +  }
> +
>    /** Builds an analyzer which removes words in
>     *  ENGLISH_STOP_WORDS.
>     * @param enablePositionIncrements See {@link
> @@ -86,6 +92,10 @@
>      enablePositionIncrements = false;
>    }
>  
> +  public StopAnalyzer(Version matchVersion, Set stopWords) {
> +    // stub
> +  }
> +
>    /** Builds an analyzer with the stop words from the given set.
>     * @param stopWords Set of stop words
>     * @param enablePositionIncrements See {@link
> @@ -103,6 +113,10 @@
>      useDefaultStopPositionIncrement = true;
>      enablePositionIncrements = false;
>    }
> +
> +  public StopAnalyzer(Version matchVersion, String[] stopWords) {
> +    // stub
> +  }
>    
>    /** Builds an analyzer which removes words in the provided array.
>     * @param stopWords Array of stop words
> @@ -124,6 +138,11 @@
>      enablePositionIncrements = false;
>    }
>  
> +  public StopAnalyzer(Version matchVersion, File stopWords) {
> +    // stub
> +  }
> +  
> +
>    /** Builds an analyzer with the stop words from the given file.
>     * @see WordlistLoader#getWordSet(File)
>     * @param stopwordsFile File to load stop words from
> @@ -145,6 +164,10 @@
>      enablePositionIncrements = false;
>    }
>  
> +  public StopAnalyzer(Version matchVersion, Reader stopwords) throws IOException {
> +    // stub
> +  }
> +
>    /** Builds an analyzer with the stop words from the given reader.
>     * @see WordlistLoader#getWordSet(Reader)
>     * @param stopwords Reader to load stop words from
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java Thu Oct 29 01:00:08 2009
> @@ -27,6 +27,7 @@
>  import org.apache.lucene.analysis.tokenattributes.TermAttribute;
>  import org.apache.lucene.analysis.tokenattributes.TypeAttribute;
>  import org.apache.lucene.util.AttributeSource;
> +import org.apache.lucene.util.Version;
>  
>  /** A grammar-based tokenizer constructed with JFlex
>   *
> @@ -47,7 +48,7 @@
>  
>  public class StandardTokenizer extends Tokenizer {
>    /** A private instance of the JFlex-constructed scanner */
> -  private final StandardTokenizerImpl scanner;
> +  private StandardTokenizerImpl scanner;
>  
>    public static final int ALPHANUM          = 0;
>    public static final int APOSTROPHE        = 1;
> @@ -112,6 +113,10 @@
>      this(input, false);
>    }
>  
> +  public StandardTokenizer(Version matchVersion, Reader input) {
> +    // stub
> +  }
> +
>    /**
>     * Creates a new instance of the {@link org.apache.lucene.analysis.standard.StandardTokenizer}.  Attaches
>     * the <code>input</code> to the newly created JFlex scanner.
> @@ -136,6 +141,10 @@
>      init(input, replaceInvalidAcronym);
>    }
>  
> +  public StandardTokenizer(Version matchVersion, AttributeSource source, Reader input) {
> +    // stub
> +  }
> +
>    /**
>     * Creates a new StandardTokenizer with a given {@link org.apache.lucene.util.AttributeSource.AttributeFactory} 
>     */
> @@ -145,6 +154,10 @@
>      init(input, replaceInvalidAcronym);
>    }
>  
> +  public StandardTokenizer(Version matchVersion, AttributeFactory factory, Reader input) {
> +    // stub
> +  }
> +
>    private void init(Reader input, boolean replaceInvalidAcronym) {
>      this.replaceInvalidAcronym = replaceInvalidAcronym;
>      this.input = input;    
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java Thu Oct 29 01:00:08 2009
> @@ -27,6 +27,7 @@
>  import org.apache.lucene.search.MultiPhraseQuery;
>  import org.apache.lucene.search.PhraseQuery;
>  import org.apache.lucene.search.Query;
> +import org.apache.lucene.util.Version;
>  
>  /**
>   * A QueryParser which constructs queries to search multiple fields.
> @@ -69,6 +70,11 @@
>      this(fields,analyzer);
>      this.boosts = boosts;
>    }
> +
> +  public MultiFieldQueryParser(Version matchVersion, String[] fields, Analyzer analyzer, Map boosts) {
> +    // stub
> +    super(matchVersion, null, analyzer);
> +  }
>    
>    /**
>     * Creates a MultiFieldQueryParser.
> @@ -94,6 +100,11 @@
>      super(null, analyzer);
>      this.fields = fields;
>    }
> +
> +  public MultiFieldQueryParser(Version matchVersion, String[] fields, Analyzer analyzer) {
> +    // stub
> +    super(matchVersion, null, analyzer);
> +  }
>    
>    protected Query getFieldQuery(String field, String queryText, int slop) throws ParseException {
>      if (field == null) {
> @@ -203,7 +214,7 @@
>     * @throws IllegalArgumentException if the length of the queries array differs
>     *  from the length of the fields array
>     */
> -  public static Query parse(String[] queries, String[] fields,
> +  public static Query parse(Version matchVersion, String[] queries, String[] fields,
>        Analyzer analyzer) throws ParseException
>    {
>      if (queries.length != fields.length)
> @@ -251,7 +262,7 @@
>     * @throws IllegalArgumentException if the length of the fields array differs
>     *  from the length of the flags array
>     */
> -  public static Query parse(String query, String[] fields,
> +  public static Query parse(Version matchVersion, String query, String[] fields,
>        BooleanClause.Occur[] flags, Analyzer analyzer) throws ParseException {
>      if (fields.length != flags.length)
>        throw new IllegalArgumentException("fields.length != flags.length");
> @@ -298,7 +309,7 @@
>     * @throws IllegalArgumentException if the length of the queries, fields,
>     *  and flags array differ
>     */
> -  public static Query parse(String[] queries, String[] fields, BooleanClause.Occur[] flags,
> +  public static Query parse(Version matchVersion, String[] queries, String[] fields, BooleanClause.Occur[] flags,
>        Analyzer analyzer) throws ParseException
>    {
>      if (!(queries.length == fields.length && queries.length == flags.length))
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/QueryParser.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/QueryParser.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/QueryParser.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/QueryParser.java Thu Oct 29 01:00:08 2009
> @@ -35,6 +35,7 @@
>  import org.apache.lucene.search.TermQuery;
>  import org.apache.lucene.search.WildcardQuery;
>  import org.apache.lucene.util.Parameter;
> +import org.apache.lucene.util.Version;
>  
>  /**
>   * This class is generated by JavaCC.  The most important method is
> @@ -165,6 +166,10 @@
>      field = f;
>    }
>  
> +  public QueryParser(Version matchVersion, String f, Analyzer a) {
> +    // stub
> +  }
> +
>    /** Parses a query string, returning a {@link org.apache.lucene.search.Query}.
>     *  @param query  the query string to be parsed.
>     *  @throws ParseException if the parsing fails
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/QueryParser.jj
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/QueryParser.jj?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/QueryParser.jj (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/queryParser/QueryParser.jj Thu Oct 29 01:00:08 2009
> @@ -59,6 +59,7 @@
>  import org.apache.lucene.search.TermQuery;
>  import org.apache.lucene.search.WildcardQuery;
>  import org.apache.lucene.util.Parameter;
> +import org.apache.lucene.util.Version;
>  
>  /**
>   * This class is generated by JavaCC.  The most important method is
> @@ -189,6 +190,10 @@
>      field = f;
>    }
>  
> +  public QueryParser(Version matchVersion, String f, Analyzer a) {
> +    // stub
> +  }
> +
>    /** Parses a query string, returning a {@link org.apache.lucene.search.Query}.
>     *  @param query  the query string to be parsed.
>     *  @throws ParseException if the parsing fails
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/util/Constants.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/util/Constants.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/util/Constants.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/java/org/apache/lucene/util/Constants.java Thu Oct 29 01:00:08 2009
> @@ -66,8 +66,14 @@
>        }
>      }
>    }
> -
> -  public static final String LUCENE_MAIN_VERSION = "2.9";
> +  
> +  // this method prevents inlining the final version constant in compiled classes,
> +  // see: http://www.javaworld.com/community/node/3400
> +  private static String ident(final String s) {
> +    return s.toString();
> +  }
> +  
> +  public static final String LUCENE_MAIN_VERSION = ident("2.9");
>  
>    public static final String LUCENE_VERSION;
>    static {
> @@ -78,6 +84,6 @@
>      } else if (v.indexOf(LUCENE_MAIN_VERSION) == -1) {
>        v = v + " [" + LUCENE_MAIN_VERSION + "]";
>      }
> -    LUCENE_VERSION = v;
> +    LUCENE_VERSION = ident(v);
>    }
>  }
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestDemo.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestDemo.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestDemo.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestDemo.java Thu Oct 29 01:00:08 2009
> @@ -63,7 +63,7 @@
>      // Now search the index:
>      IndexSearcher isearcher = new IndexSearcher(directory, true); // read-only=true
>      // Parse a simple query that searches for "text":
> -    QueryParser parser = new QueryParser("fieldname", analyzer);
> +    QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, "fieldname", analyzer);
>      Query query = parser.parse("text");
>      ScoreDoc[] hits = isearcher.search(query, null, 1000).scoreDocs;
>      assertEquals(1, hits.length);
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSearch.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSearch.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSearch.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSearch.java Thu Oct 29 01:00:08 2009
> @@ -22,6 +22,7 @@
>  import java.io.StringWriter;
>  
>  import org.apache.lucene.util.LuceneTestCase;
> +import org.apache.lucene.util.Version;
>  import junit.framework.TestSuite;
>  import junit.textui.TestRunner;
>  
> @@ -110,7 +111,7 @@
>        };
>        ScoreDoc[] hits = null;
>  
> -      QueryParser parser = new QueryParser("contents", analyzer);
> +      QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, "contents", analyzer);
>        parser.setPhraseSlop(4);
>        for (int j = 0; j < queries.length; j++) {
>          Query query = parser.parse(queries[j]);
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSearchForDuplicates.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSearchForDuplicates.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSearchForDuplicates.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSearchForDuplicates.java Thu Oct 29 01:00:08 2009
> @@ -27,8 +27,10 @@
>  import org.apache.lucene.index.*;
>  import org.apache.lucene.search.*;
>  import org.apache.lucene.queryParser.*;
> +import org.apache.lucene.util.Version;
>  
>  import org.apache.lucene.util.LuceneTestCase;
> +import org.apache.lucene.util.Version;
>  import junit.framework.TestSuite;
>  import junit.textui.TestRunner;
>  
> @@ -102,7 +104,7 @@
>        // try a search without OR
>        Searcher searcher = new IndexSearcher(directory, true);
>  
> -      QueryParser parser = new QueryParser(PRIORITY_FIELD, analyzer);
> +      QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, PRIORITY_FIELD, analyzer);
>  
>        Query query = parser.parse(HIGH_PRIORITY);
>        out.println("Query: " + query.toString(PRIORITY_FIELD));
> @@ -117,7 +119,7 @@
>        searcher = new IndexSearcher(directory, true);
>        hits = null;
>  
> -      parser = new QueryParser(PRIORITY_FIELD, analyzer);
> +      parser = new QueryParser(Version.LUCENE_CURRENT, PRIORITY_FIELD, analyzer);
>  
>        query = parser.parse(HIGH_PRIORITY + " OR " + MED_PRIORITY);
>        out.println("Query: " + query.toString(PRIORITY_FIELD));
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSnapshotDeletionPolicy.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSnapshotDeletionPolicy.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSnapshotDeletionPolicy.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/TestSnapshotDeletionPolicy.java Thu Oct 29 01:00:08 2009
> @@ -68,7 +68,7 @@
>      Directory dir = new MockRAMDirectory();
>  
>      SnapshotDeletionPolicy dp = new SnapshotDeletionPolicy(new KeepOnlyLastCommitDeletionPolicy());
> -    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), dp, IndexWriter.MaxFieldLength.UNLIMITED);
> +    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), dp, IndexWriter.MaxFieldLength.UNLIMITED);
>      // Force frequent commits
>      writer.setMaxBufferedDocs(2);
>      Document doc = new Document();
> @@ -84,7 +84,7 @@
>      writer.close();
>      copyFiles(dir, cp);
>      
> -    writer = new IndexWriter(dir, new StandardAnalyzer(), dp, IndexWriter.MaxFieldLength.UNLIMITED);
> +    writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), dp, IndexWriter.MaxFieldLength.UNLIMITED);
>      copyFiles(dir, cp);
>      for(int i=0;i<7;i++) {
>        writer.addDocument(doc);
> @@ -97,7 +97,7 @@
>      writer.close();
>      copyFiles(dir, cp);
>      dp.release();
> -    writer = new IndexWriter(dir, new StandardAnalyzer(), dp, IndexWriter.MaxFieldLength.UNLIMITED);
> +    writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), dp, IndexWriter.MaxFieldLength.UNLIMITED);
>      writer.close();
>      try {
>        copyFiles(dir, cp);
> @@ -113,7 +113,7 @@
>      final long stopTime = System.currentTimeMillis() + 7000;
>  
>      SnapshotDeletionPolicy dp = new SnapshotDeletionPolicy(new KeepOnlyLastCommitDeletionPolicy());
> -    final IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), dp, IndexWriter.MaxFieldLength.UNLIMITED);
> +    final IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), dp, IndexWriter.MaxFieldLength.UNLIMITED);
>  
>      // Force frequent commits
>      writer.setMaxBufferedDocs(2);
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestAnalyzers.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestAnalyzers.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestAnalyzers.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestAnalyzers.java Thu Oct 29 01:00:08 2009
> @@ -26,6 +26,7 @@
>  import org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
>  import org.apache.lucene.analysis.tokenattributes.TermAttribute;
>  import org.apache.lucene.index.Payload;
> +import org.apache.lucene.util.Version;
>  
>  public class TestAnalyzers extends BaseTokenStreamTestCase {
>  
> @@ -74,7 +75,7 @@
>    }
>  
>    public void testStop() throws Exception {
> -    Analyzer a = new StopAnalyzer();
> +    Analyzer a = new StopAnalyzer(Version.LUCENE_CURRENT);
>      assertAnalyzesTo(a, "foo bar FOO BAR", 
>                       new String[] { "foo", "bar", "foo", "bar" });
>      assertAnalyzesTo(a, "foo a bar such FOO THESE BAR", 
> @@ -120,6 +121,10 @@
>    }
>  
>    private static class MyStandardAnalyzer extends StandardAnalyzer {
> +    public MyStandardAnalyzer() {
> +      super(org.apache.lucene.util.Version.LUCENE_CURRENT);
> +    }
> +  
>      public TokenStream tokenStream(String field, Reader reader) {
>        return new WhitespaceAnalyzer().tokenStream(field, reader);
>      }
>
> Propchange: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Thu Oct 29 01:00:08 2009
> @@ -1,2 +1,2 @@
>  /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:748824
> -/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:824919-825624
> +/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:824919-830375
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java Thu Oct 29 01:00:08 2009
> @@ -31,6 +31,7 @@
>  import org.apache.lucene.search.Query;
>  import org.apache.lucene.search.ScoreDoc;
>  import org.apache.lucene.store.RAMDirectory;
> +import org.apache.lucene.util.Version;
>  
>  public class TestKeywordAnalyzer extends BaseTokenStreamTestCase {
>    
> @@ -58,7 +59,7 @@
>      PerFieldAnalyzerWrapper analyzer = new PerFieldAnalyzerWrapper(new SimpleAnalyzer());
>      analyzer.addAnalyzer("partnum", new KeywordAnalyzer());
>  
> -    QueryParser queryParser = new QueryParser("description", analyzer);
> +    QueryParser queryParser = new QueryParser(Version.LUCENE_CURRENT, "description", analyzer);
>      Query query = queryParser.parse("partnum:Q36 AND SPACE");
>  
>      ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs;
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStandardAnalyzer.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStandardAnalyzer.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStandardAnalyzer.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStandardAnalyzer.java Thu Oct 29 01:00:08 2009
> @@ -5,6 +5,7 @@
>  import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
>  import org.apache.lucene.analysis.tokenattributes.TermAttribute;
>  import org.apache.lucene.analysis.tokenattributes.TypeAttribute;
> +import org.apache.lucene.util.Version;
>  
>  import java.io.StringReader;
>  
> @@ -26,16 +27,16 @@
>  
>  public class TestStandardAnalyzer extends BaseTokenStreamTestCase {
>  
> -  private Analyzer a = new StandardAnalyzer();
> +  private Analyzer a = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>  
>    public void testMaxTermLength() throws Exception {
> -    StandardAnalyzer sa = new StandardAnalyzer();
> +    StandardAnalyzer sa = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>      sa.setMaxTokenLength(5);
>      assertAnalyzesTo(sa, "ab cd toolong xy z", new String[]{"ab", "cd", "xy", "z"});
>    }
>  
>    public void testMaxTermLength2() throws Exception {
> -    StandardAnalyzer sa = new StandardAnalyzer();
> +    StandardAnalyzer sa = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>      assertAnalyzesTo(sa, "ab cd toolong xy z", new String[]{"ab", "cd", "toolong", "xy", "z"});
>      sa.setMaxTokenLength(5);
>      
> @@ -99,24 +100,26 @@
>  
>    public void testLucene1140() throws Exception {
>      try {
> -      StandardAnalyzer analyzer = new StandardAnalyzer(true);
> +      StandardAnalyzer analyzer = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>        assertAnalyzesTo(analyzer, "www.nutch.org.", new String[]{ "www.nutch.org" }, new String[] { "<HOST>" });
>      } catch (NullPointerException e) {
> -      assertTrue("Should not throw an NPE and it did", false);
> +      fail("Should not throw an NPE and it did");
>      }
>  
>    }
>  
>    public void testDomainNames() throws Exception {
>      // Don't reuse a because we alter its state (setReplaceInvalidAcronym)
> -    StandardAnalyzer a2 = new StandardAnalyzer();
> +    StandardAnalyzer a2 = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>      // domain names
>      assertAnalyzesTo(a2, "www.nutch.org", new String[]{"www.nutch.org"});
>      //Notice the trailing .  See https://issues.apache.org/jira/browse/LUCENE-1068.
>      // the following should be recognized as HOST:
>      assertAnalyzesTo(a2, "www.nutch.org.", new String[]{ "www.nutch.org" }, new String[] { "<HOST>" });
> -    a2.setReplaceInvalidAcronym(false);
> +    /* no support for 2.3 here:
> +    a2 = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_23);
>      assertAnalyzesTo(a2, "www.nutch.org.", new String[]{ "wwwnutchorg" }, new String[] { "<ACRONYM>" });
> +    */
>    }
>  
>    public void testEMailAddresses() throws Exception {
> @@ -220,11 +223,4 @@
>                      "<ALPHANUM>", "<NUM>", "<HOST>", "<NUM>", "<ALPHANUM>",
>                      "<ALPHANUM>", "<HOST>"});
>    }
> -
> -  /** @deprecated this should be removed in the 3.0. */
> -   public void testDeprecatedAcronyms() throws Exception {
> - 	// test backward compatibility for applications that require the old behavior.
> - 	// this should be removed once replaceDepAcronym is removed.
> - 	  assertAnalyzesTo(a, "lucene.apache.org.", new String[]{ "lucene.apache.org" }, new String[] { "<HOST>" });
> -   }
>  }
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java Thu Oct 29 01:00:08 2009
> @@ -19,6 +19,7 @@
>  
>  import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
>  import org.apache.lucene.analysis.tokenattributes.TermAttribute;
> +import org.apache.lucene.util.Version;
>  
>  import java.io.StringReader;
>  import java.io.IOException;
> @@ -28,7 +29,7 @@
>  
>  public class TestStopAnalyzer extends BaseTokenStreamTestCase {
>    
> -  private StopAnalyzer stop = new StopAnalyzer(false);
> +  private StopAnalyzer stop = new StopAnalyzer(Version.LUCENE_CURRENT);
>    private Set inValidTokens = new HashSet();
>    
>    public TestStopAnalyzer(String s) {
> @@ -61,7 +62,7 @@
>      stopWordsSet.add("good");
>      stopWordsSet.add("test");
>      stopWordsSet.add("analyzer");
> -    StopAnalyzer newStop = new StopAnalyzer((String[])stopWordsSet.toArray(new String[3]));
> +    StopAnalyzer newStop = new StopAnalyzer(Version.LUCENE_24, stopWordsSet);
>      StringReader reader = new StringReader("This is a good test of the english stop analyzer");
>      TokenStream stream = newStop.tokenStream("test", reader);
>      assertNotNull(stream);
> @@ -71,34 +72,28 @@
>      while (stream.incrementToken()) {
>        String text = termAtt.term();
>        assertFalse(stopWordsSet.contains(text));
> -      assertEquals(1,posIncrAtt.getPositionIncrement()); // by default stop tokenizer does not apply increments.
> +      assertEquals(1,posIncrAtt.getPositionIncrement()); // in 2.4 stop tokenizer does not apply increments.
>      }
>    }
>  
>    public void testStopListPositions() throws IOException {
> -    boolean defaultEnable = StopFilter.getEnablePositionIncrementsDefault();
> -    StopFilter.setEnablePositionIncrementsDefault(true);
> -    try {
> -      Set stopWordsSet = new HashSet();
> -      stopWordsSet.add("good");
> -      stopWordsSet.add("test");
> -      stopWordsSet.add("analyzer");
> -      StopAnalyzer newStop = new StopAnalyzer((String[])stopWordsSet.toArray(new String[3]));
> -      StringReader reader = new StringReader("This is a good test of the english stop analyzer with positions");
> -      int expectedIncr[] =                  { 1,   1, 1,          3, 1,  1,      1,            2,   1};
> -      TokenStream stream = newStop.tokenStream("test", reader);
> -      assertNotNull(stream);
> -      int i = 0;
> -      TermAttribute termAtt = (TermAttribute) stream.getAttribute(TermAttribute.class);
> -      PositionIncrementAttribute posIncrAtt = (PositionIncrementAttribute) stream.addAttribute(PositionIncrementAttribute.class);
> -
> -      while (stream.incrementToken()) {
> -        String text = termAtt.term();
> -        assertFalse(stopWordsSet.contains(text));
> -        assertEquals(expectedIncr[i++],posIncrAtt.getPositionIncrement());
> -      }
> -    } finally {
> -      StopFilter.setEnablePositionIncrementsDefault(defaultEnable);
> +    Set stopWordsSet = new HashSet();
> +    stopWordsSet.add("good");
> +    stopWordsSet.add("test");
> +    stopWordsSet.add("analyzer");
> +    StopAnalyzer newStop = new StopAnalyzer(Version.LUCENE_CURRENT, stopWordsSet);
> +    StringReader reader = new StringReader("This is a good test of the english stop analyzer with positions");
> +    int expectedIncr[] =                  { 1,   1, 1,          3, 1,  1,      1,            2,   1};
> +    TokenStream stream = newStop.tokenStream("test", reader);
> +    assertNotNull(stream);
> +    int i = 0;
> +    TermAttribute termAtt = (TermAttribute) stream.getAttribute(TermAttribute.class);
> +    PositionIncrementAttribute posIncrAtt = (PositionIncrementAttribute) stream.addAttribute(PositionIncrementAttribute.class);
> +
> +    while (stream.incrementToken()) {
> +      String text = termAtt.term();
> +      assertFalse(stopWordsSet.contains(text));
> +      assertEquals(expectedIncr[i++],posIncrAtt.getPositionIncrement());
>      }
>    }
>  
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStopFilter.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStopFilter.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStopFilter.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestStopFilter.java Thu Oct 29 01:00:08 2009
> @@ -23,7 +23,9 @@
>  import java.io.IOException;
>  import java.io.StringReader;
>  import java.util.ArrayList;
> +import java.util.Arrays;
>  import java.util.Set;
> +import java.util.HashSet;
>  
>  
>  public class TestStopFilter extends BaseTokenStreamTestCase {
> @@ -34,8 +36,8 @@
>  
>    public void testExactCase() throws IOException {
>      StringReader reader = new StringReader("Now is The Time");
> -    String[] stopWords = new String[] { "is", "the", "Time" };
> -    TokenStream stream = new StopFilter(false, new WhitespaceTokenizer(reader), stopWords);
> +    Set stopWords = new HashSet(Arrays.asList(new String[]{"is", "the", "Time"}));
> +    TokenStream stream = new StopFilter(false, new WhitespaceTokenizer(reader), stopWords, false);
>      final TermAttribute termAtt = (TermAttribute) stream.getAttribute(TermAttribute.class);
>      assertTrue(stream.incrementToken());
>      assertEquals("Now", termAtt.term());
> @@ -46,7 +48,7 @@
>  
>    public void testIgnoreCase() throws IOException {
>      StringReader reader = new StringReader("Now is The Time");
> -    String[] stopWords = new String[] { "is", "the", "Time" };
> +    Set stopWords = new HashSet(Arrays.asList(new String[]{"is", "the", "Time"}));
>      TokenStream stream = new StopFilter(false, new WhitespaceTokenizer(reader), stopWords, true);
>      final TermAttribute termAtt = (TermAttribute) stream.getAttribute(TermAttribute.class);
>      assertTrue(stream.incrementToken());
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestTeeSinkTokenFilter.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestTeeSinkTokenFilter.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestTeeSinkTokenFilter.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestTeeSinkTokenFilter.java Thu Oct 29 01:00:08 2009
> @@ -22,6 +22,7 @@
>  import org.apache.lucene.analysis.tokenattributes.TermAttribute;
>  import org.apache.lucene.util.AttributeSource;
>  import org.apache.lucene.util.English;
> +import org.apache.lucene.util.Version;
>  
>  import java.io.IOException;
>  import java.io.StringReader;
> @@ -167,10 +168,10 @@
>          buffer.append(English.intToEnglish(i).toUpperCase()).append(' ');
>        }
>        //make sure we produce the same tokens
> -      TeeSinkTokenFilter teeStream = new TeeSinkTokenFilter(new StandardFilter(new StandardTokenizer(new StringReader(buffer.toString()))));
> +      TeeSinkTokenFilter teeStream = new TeeSinkTokenFilter(new StandardFilter(new StandardTokenizer(Version.LUCENE_CURRENT, new StringReader(buffer.toString()))));
>        TokenStream sink = teeStream.newSinkTokenStream(new ModuloSinkFilter(100));
>        teeStream.consumeAllTokens();
> -      TokenStream stream = new ModuloTokenFilter(new StandardFilter(new StandardTokenizer(new StringReader(buffer.toString()))), 100);
> +      TokenStream stream = new ModuloTokenFilter(new StandardFilter(new StandardTokenizer(Version.LUCENE_CURRENT, new StringReader(buffer.toString()))), 100);
>        TermAttribute tfTok = (TermAttribute) stream.addAttribute(TermAttribute.class);
>        TermAttribute sinkTok = (TermAttribute) sink.addAttribute(TermAttribute.class);
>        for (int i=0; stream.incrementToken(); i++) {
> @@ -183,12 +184,12 @@
>          int tfPos = 0;
>          long start = System.currentTimeMillis();
>          for (int i = 0; i < 20; i++) {
> -          stream = new StandardFilter(new StandardTokenizer(new StringReader(buffer.toString())));
> +          stream = new StandardFilter(new StandardTokenizer(Version.LUCENE_CURRENT, new StringReader(buffer.toString())));
>            PositionIncrementAttribute posIncrAtt = (PositionIncrementAttribute) stream.getAttribute(PositionIncrementAttribute.class);
>            while (stream.incrementToken()) {
>              tfPos += posIncrAtt.getPositionIncrement();
>            }
> -          stream = new ModuloTokenFilter(new StandardFilter(new StandardTokenizer(new StringReader(buffer.toString()))), modCounts[j]);
> +          stream = new ModuloTokenFilter(new StandardFilter(new StandardTokenizer(Version.LUCENE_CURRENT, new StringReader(buffer.toString()))), modCounts[j]);
>            posIncrAtt = (PositionIncrementAttribute) stream.getAttribute(PositionIncrementAttribute.class);
>            while (stream.incrementToken()) {
>              tfPos += posIncrAtt.getPositionIncrement();
> @@ -200,7 +201,7 @@
>          //simulate one field with one sink
>          start = System.currentTimeMillis();
>          for (int i = 0; i < 20; i++) {
> -          teeStream = new TeeSinkTokenFilter(new StandardFilter(new StandardTokenizer(new StringReader(buffer.toString()))));
> +          teeStream = new TeeSinkTokenFilter(new StandardFilter(new StandardTokenizer(Version.LUCENE_CURRENT, new StringReader(buffer.toString()))));
>            sink = teeStream.newSinkTokenStream(new ModuloSinkFilter(modCounts[j]));
>            PositionIncrementAttribute posIncrAtt = (PositionIncrementAttribute) teeStream.getAttribute(PositionIncrementAttribute.class);
>            while (teeStream.incrementToken()) {
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java Thu Oct 29 01:00:08 2009
> @@ -146,7 +146,7 @@
>      t.setTermBuffer(b, 0, 5);
>      assertEquals("(aloha,0,5)", t.toString());
>  
> -    t.setTermText("hi there");
> +    t.setTermBuffer("hi there");
>      assertEquals("(hi there,0,5)", t.toString());
>    }
>  
> @@ -167,20 +167,17 @@
>    
>    public void testMixedStringArray() throws Exception {
>      Token t = new Token("hello", 0, 5);
> -    assertEquals(t.termText(), "hello");
>      assertEquals(t.termLength(), 5);
>      assertEquals(t.term(), "hello");
> -    t.setTermText("hello2");
> +    t.setTermBuffer("hello2");
>      assertEquals(t.termLength(), 6);
>      assertEquals(t.term(), "hello2");
>      t.setTermBuffer("hello3".toCharArray(), 0, 6);
> -    assertEquals(t.termText(), "hello3");
> +    assertEquals(t.term(), "hello3");
>  
> -    // Make sure if we get the buffer and change a character
> -    // that termText() reflects the change
>      char[] buffer = t.termBuffer();
>      buffer[1] = 'o';
> -    assertEquals(t.termText(), "hollo3");
> +    assertEquals(t.term(), "hollo3");
>    }
>    
>    public void testClone() throws Exception {
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestBinaryDocument.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestBinaryDocument.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestBinaryDocument.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestBinaryDocument.java Thu Oct 29 01:00:08 2009
> @@ -62,7 +62,7 @@
>      
>      /** add the doc to a ram index */
>      MockRAMDirectory dir = new MockRAMDirectory();
> -    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      writer.addDocument(doc);
>      writer.close();
>      
> @@ -100,7 +100,7 @@
>      
>      /** add the doc to a ram index */
>      MockRAMDirectory dir = new MockRAMDirectory();
> -    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      writer.addDocument(doc);
>      writer.close();
>      
>
> Propchange: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestDateTools.java
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Thu Oct 29 01:00:08 2009
> @@ -1,2 +1,2 @@
>  /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestDateTools.java:748824
> -/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestDateTools.java:824919-825624
> +/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestDateTools.java:824919-830375
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestDocument.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestDocument.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestDocument.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestDocument.java Thu Oct 29 01:00:08 2009
> @@ -157,7 +157,7 @@
>      public void testGetValuesForIndexedDocument() throws Exception
>      {
>          RAMDirectory dir = new RAMDirectory();
> -        IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +        IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>          writer.addDocument(makeDocumentWithFields());
>          writer.close();
>  
> @@ -228,7 +228,7 @@
>        doc.add(new Field("keyword", "test", Field.Store.YES, Field.Index.NOT_ANALYZED));
>  
>        RAMDirectory dir = new RAMDirectory();
> -      IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +      IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>        writer.addDocument(doc);
>        field.setValue("id2");
>        writer.addDocument(doc);
>
> Propchange: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestNumberTools.java
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Thu Oct 29 01:00:08 2009
> @@ -1,2 +1,2 @@
>  /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestNumberTools.java:748824
> -/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestNumberTools.java:824919-825624
> +/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/document/TestNumberTools.java:824919-830375
>
> Propchange: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Thu Oct 29 01:00:08 2009
> @@ -1,2 +1,2 @@
>  /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:748824
> -/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:824919-825624
> +/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:824919-830375
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestCheckIndex.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestCheckIndex.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestCheckIndex.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestCheckIndex.java Thu Oct 29 01:00:08 2009
> @@ -90,7 +90,6 @@
>      assertTrue(checker.checkIndex(onlySegments).clean == true);
>    }
>  
> -  /* Does not work, because compilation puts final field from Constants of 2.9 into class file:
>    public void testLuceneConstantVersion() throws IOException {
>      // common-build.xml sets lucene.version
>      final String version = System.getProperty("lucene.version");
> @@ -98,5 +97,5 @@
>      assertTrue(version.equals(Constants.LUCENE_MAIN_VERSION+"-dev") ||
>                 version.equals(Constants.LUCENE_MAIN_VERSION));
>      assertTrue(Constants.LUCENE_VERSION.startsWith(version));
> -  }*/
> +  }
>  }
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDirectoryReader.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDirectoryReader.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDirectoryReader.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDirectoryReader.java Thu Oct 29 01:00:08 2009
> @@ -193,7 +193,7 @@
>    }
>  
>    private void addDoc(RAMDirectory ramDir1, String s, boolean create) throws IOException {
> -    IndexWriter iw = new IndexWriter(ramDir1, new StandardAnalyzer(), create, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter iw = new IndexWriter(ramDir1, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), create, IndexWriter.MaxFieldLength.LIMITED);
>      Document doc = new Document();
>      doc.add(new Field("body", s, Field.Store.YES, Field.Index.ANALYZED));
>      iw.addDocument(doc);
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDocumentWriter.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDocumentWriter.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDocumentWriter.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDocumentWriter.java Thu Oct 29 01:00:08 2009
> @@ -259,7 +259,7 @@
>      doc.add(new Field("f2", "v1", Store.YES, Index.NOT_ANALYZED, TermVector.WITH_POSITIONS_OFFSETS));
>      doc.add(new Field("f2", "v2", Store.YES, Index.NOT_ANALYZED, TermVector.NO));
>  
> -    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      writer.addDocument(doc);
>      writer.close();
>  
> @@ -292,7 +292,7 @@
>      doc.add(f);
>      doc.add(new Field("f2", "v2", Store.YES, Index.NO));
>  
> -    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      writer.addDocument(doc);
>      writer.optimize(); // be sure to have a single segment
>      writer.close();
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReader.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReader.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReader.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReader.java Thu Oct 29 01:00:08 2009
> @@ -76,7 +76,7 @@
>        commitUserData.put("foo", "fighters");
>        
>        // set up writer
> -      IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +      IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>        writer.setMaxBufferedDocs(2);
>        for(int i=0;i<27;i++)
>          addDocumentWithFields(writer);
> @@ -98,7 +98,7 @@
>        assertTrue(c.equals(r.getIndexCommit()));
>  
>        // Change the index
> -      writer = new IndexWriter(d, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +      writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>        writer.setMaxBufferedDocs(2);
>        for(int i=0;i<7;i++)
>          addDocumentWithFields(writer);
> @@ -109,7 +109,7 @@
>        assertFalse(r2.getIndexCommit().isOptimized());
>        r3.close();
>  
> -      writer = new IndexWriter(d, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +      writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>        writer.optimize();
>        writer.close();
>  
> @@ -123,19 +123,19 @@
>      public void testIsCurrent() throws Exception
>      {
>        RAMDirectory d = new MockRAMDirectory();
> -      IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +      IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>        addDocumentWithFields(writer);
>        writer.close();
>        // set up reader:
>        IndexReader reader = IndexReader.open(d, false);
>        assertTrue(reader.isCurrent());
>        // modify index by adding another document:
> -      writer = new IndexWriter(d, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +      writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>        addDocumentWithFields(writer);
>        writer.close();
>        assertFalse(reader.isCurrent());
>        // re-create index:
> -      writer = new IndexWriter(d, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +      writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>        addDocumentWithFields(writer);
>        writer.close();
>        assertFalse(reader.isCurrent());
> @@ -151,7 +151,7 @@
>      {
>          RAMDirectory d = new MockRAMDirectory();
>          // set up writer
> -        IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +        IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>          addDocumentWithFields(writer);
>          writer.close();
>          // set up reader
> @@ -163,7 +163,7 @@
>          assertTrue(fieldNames.contains("unstored"));
>          reader.close();
>          // add more documents
> -        writer = new IndexWriter(d, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +        writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>          // want to get some more segments here
>          for (int i = 0; i < 5*writer.getMergeFactor(); i++)
>          {
> @@ -243,7 +243,7 @@
>    public void testTermVectors() throws Exception {
>      RAMDirectory d = new MockRAMDirectory();
>      // set up writer
> -    IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      // want to get some more segments here
>      // new termvector fields
>      for (int i = 0; i < 5 * writer.getMergeFactor(); i++) {
> @@ -1396,7 +1396,7 @@
>        RAMDirectory d = new MockRAMDirectory();
>  
>        // set up writer
> -      IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +      IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>        writer.setMaxBufferedDocs(2);
>        for(int i=0;i<27;i++)
>          addDocumentWithFields(writer);
> @@ -1412,7 +1412,7 @@
>        assertTrue(c.equals(r.getIndexCommit()));
>  
>        // Change the index
> -      writer = new IndexWriter(d, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +      writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>        writer.setMaxBufferedDocs(2);
>        for(int i=0;i<7;i++)
>          addDocumentWithFields(writer);
> @@ -1423,7 +1423,7 @@
>        assertFalse(r2.getIndexCommit().isOptimized());
>        r2.close();
>  
> -      writer = new IndexWriter(d, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +      writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>        writer.optimize();
>        writer.close();
>  
> @@ -1437,7 +1437,7 @@
>  
>      public void testReadOnly() throws Throwable {
>        RAMDirectory d = new MockRAMDirectory();
> -      IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +      IndexWriter writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>        addDocumentWithFields(writer);
>        writer.commit();
>        addDocumentWithFields(writer);
> @@ -1451,7 +1451,7 @@
>          // expected
>        }
>        
> -      writer = new IndexWriter(d, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +      writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>        addDocumentWithFields(writer);
>        writer.close();
>  
> @@ -1468,7 +1468,7 @@
>          // expected
>        }
>  
> -      writer = new IndexWriter(d, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +      writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>        writer.optimize();
>        writer.close();
>  
> @@ -1486,7 +1486,7 @@
>        }
>  
>        // Make sure write lock isn't held
> -      writer = new IndexWriter(d, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +      writer = new IndexWriter(d, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>        writer.close();
>  
>        r3.close();
> @@ -1496,7 +1496,7 @@
>    // LUCENE-1474
>    public void testIndexReader() throws Exception {
>      Directory dir = new RAMDirectory();
> -    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(),
> +    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                                           IndexWriter.MaxFieldLength.UNLIMITED);
>      writer.addDocument(createDocument("a"));
>      writer.addDocument(createDocument("b"));
> @@ -1514,7 +1514,7 @@
>    public void testIndexReaderUnDeleteAll() throws Exception {
>      MockRAMDirectory dir = new MockRAMDirectory();
>      dir.setPreventDoubleWrite(false);
> -    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(),
> +    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                                           IndexWriter.MaxFieldLength.UNLIMITED);
>      writer.addDocument(createDocument("a"));
>      writer.addDocument(createDocument("b"));
> @@ -1556,7 +1556,7 @@
>  
>      Directory dir = new MockRAMDirectory();
>      
> -    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(),
> +    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                                           IndexWriter.MaxFieldLength.LIMITED);
>  
>      writer.setMaxBufferedDocs(2);
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java Thu Oct 29 01:00:08 2009
> @@ -69,7 +69,7 @@
>    protected void setUp() throws Exception {
>      super.setUp();
>      similarityOne = new SimilarityOne();
> -    anlzr = new StandardAnalyzer();
> +    anlzr = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>    }
>    
>    /**
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java Thu Oct 29 01:00:08 2009
> @@ -687,7 +687,7 @@
>      final Directory dir = new MockRAMDirectory();
>      final int n = 150;
>  
> -    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.LIMITED);
>      for (int i = 0; i < n; i++) {
>        writer.addDocument(createDocument(i, 3));
>      }
> @@ -705,7 +705,7 @@
>            modifier.deleteDocument(i % modifier.maxDoc());
>            modifier.close();
>          } else {
> -          IndexWriter modifier = new IndexWriter(dir, new StandardAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);
> +          IndexWriter modifier = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.LIMITED);
>            modifier.addDocument(createDocument(n + i, 6));
>            modifier.close();
>          }
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java Thu Oct 29 01:00:08 2009
> @@ -67,6 +67,7 @@
>  import org.apache.lucene.store.SingleInstanceLockFactory;
>  import org.apache.lucene.util.UnicodeUtil;
>  import org.apache.lucene.util._TestUtil;
> +import org.apache.lucene.util.Version;
>  
>  /**
>   *
> @@ -553,7 +554,7 @@
>      */
>      public void testWickedLongTerm() throws IOException {
>        RAMDirectory dir = new RAMDirectory();
> -      IndexWriter writer  = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +      IndexWriter writer  = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>  
>        char[] chars = new char[DocumentsWriter.CHAR_BLOCK_SIZE-1];
>        Arrays.fill(chars, 'x');
> @@ -597,7 +598,7 @@
>        // maximum length term, and search on that term:
>        doc = new Document();
>        doc.add(new Field("content", bigTerm, Field.Store.NO, Field.Index.ANALYZED));
> -      StandardAnalyzer sa = new StandardAnalyzer();
> +      StandardAnalyzer sa = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>        sa.setMaxTokenLength(100000);
>        writer  = new IndexWriter(dir, sa, IndexWriter.MaxFieldLength.LIMITED);
>        writer.addDocument(doc);
> @@ -1585,7 +1586,7 @@
>     */
>    public void testBadSegment() throws IOException {
>      MockRAMDirectory dir = new MockRAMDirectory();
> -    IndexWriter ir = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter ir = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      
>      Document document = new Document();
>      document.add(new Field("tvtest", "", Field.Store.NO, Field.Index.ANALYZED,
> @@ -1598,7 +1599,7 @@
>    // LUCENE-1008
>    public void testNoTermVectorAfterTermVector() throws IOException {
>      MockRAMDirectory dir = new MockRAMDirectory();
> -    IndexWriter iw = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter iw = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      Document document = new Document();
>      document.add(new Field("tvtest", "a b c", Field.Store.NO, Field.Index.ANALYZED,
>          Field.TermVector.YES));
> @@ -1624,7 +1625,7 @@
>    // LUCENE-1010
>    public void testNoTermVectorAfterTermVectorMerge() throws IOException {
>      MockRAMDirectory dir = new MockRAMDirectory();
> -    IndexWriter iw = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter iw = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      Document document = new Document();
>      document.add(new Field("tvtest", "a b c", Field.Store.NO, Field.Index.ANALYZED,
>          Field.TermVector.YES));
> @@ -1656,7 +1657,7 @@
>      int pri = Thread.currentThread().getPriority();
>      try {
>        MockRAMDirectory dir = new MockRAMDirectory();
> -      IndexWriter iw = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +      IndexWriter iw = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>        Document document = new Document();
>        document.add(new Field("tvtest", "a b c", Field.Store.NO, Field.Index.ANALYZED,
>                               Field.TermVector.YES));
> @@ -1694,7 +1695,7 @@
>    // LUCENE-1013
>    public void testSetMaxMergeDocs() throws IOException {
>      MockRAMDirectory dir = new MockRAMDirectory();
> -    IndexWriter iw = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter iw = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      iw.setMergeScheduler(new MyMergeScheduler());
>      iw.setMaxMergeDocs(20);
>      iw.setMaxBufferedDocs(2);
> @@ -1713,7 +1714,7 @@
>      IndexWriter writer = new IndexWriter(dir, new Analyzer() {
>  
>        public TokenStream tokenStream(String fieldName, Reader reader) {
> -        return new TokenFilter(new StandardTokenizer(reader)) {
> +        return new TokenFilter(new StandardTokenizer(Version.LUCENE_CURRENT, reader)) {
>            private int count = 0;
>  
>            public boolean incrementToken() throws IOException {
> @@ -2743,7 +2744,7 @@
>      Directory dir = new MockRAMDirectory();
>      for(int iter=0;iter<2;iter++) {
>        IndexWriter writer = new IndexWriter(dir,
> -                                           new StandardAnalyzer(), IndexWriter.MaxFieldLength.UNLIMITED);
> +                                           new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.UNLIMITED);
>        writer.setMaxBufferedDocs(2);
>        writer.setRAMBufferSizeMB(IndexWriter.DISABLE_AUTO_FLUSH);
>        writer.setMergeScheduler(new SerialMergeScheduler());
> @@ -2776,7 +2777,7 @@
>        reader.close();
>  
>        writer = new IndexWriter(dir,
> -                               new StandardAnalyzer(), IndexWriter.MaxFieldLength.UNLIMITED);
> +                               new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.UNLIMITED);
>        writer.setMaxBufferedDocs(2);
>        writer.setRAMBufferSizeMB(IndexWriter.DISABLE_AUTO_FLUSH);
>        writer.setMergeScheduler(new SerialMergeScheduler());
> @@ -2795,7 +2796,7 @@
>      Directory dir = new MockRAMDirectory();
>      for(int iter=0;iter<2;iter++) {
>        IndexWriter writer = new IndexWriter(dir,
> -                                           new StandardAnalyzer(), IndexWriter.MaxFieldLength.UNLIMITED);
> +                                           new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.UNLIMITED);
>        writer.setMaxBufferedDocs(2);
>        writer.setRAMBufferSizeMB(IndexWriter.DISABLE_AUTO_FLUSH);
>        writer.setMergeScheduler(new SerialMergeScheduler());
> @@ -2832,7 +2833,7 @@
>    public void testTermVectorCorruption3() throws IOException {
>      Directory dir = new MockRAMDirectory();
>      IndexWriter writer = new IndexWriter(dir,
> -                                         new StandardAnalyzer(),
> +                                         new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                                           IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMaxBufferedDocs(2);
>      writer.setRAMBufferSizeMB(IndexWriter.DISABLE_AUTO_FLUSH);
> @@ -2854,7 +2855,7 @@
>      writer.close();
>  
>      writer = new IndexWriter(dir,
> -                             new StandardAnalyzer(),
> +                             new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                               IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMaxBufferedDocs(2);
>      writer.setRAMBufferSizeMB(IndexWriter.DISABLE_AUTO_FLUSH);
> @@ -2902,7 +2903,7 @@
>    public void testExpungeDeletes() throws IOException {
>      Directory dir = new MockRAMDirectory();
>      IndexWriter writer = new IndexWriter(dir,
> -                                         new StandardAnalyzer(),
> +                                         new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                                           IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMaxBufferedDocs(2);
>      writer.setRAMBufferSizeMB(IndexWriter.DISABLE_AUTO_FLUSH);
> @@ -2930,7 +2931,7 @@
>      ir.close();
>  
>      writer = new IndexWriter(dir,
> -                             new StandardAnalyzer(),
> +                             new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                               IndexWriter.MaxFieldLength.LIMITED);
>      assertEquals(8, writer.numDocs());
>      assertEquals(10, writer.maxDoc());
> @@ -2948,7 +2949,7 @@
>    public void testExpungeDeletes2() throws IOException {
>      Directory dir = new MockRAMDirectory();
>      IndexWriter writer = new IndexWriter(dir,
> -                                         new StandardAnalyzer(),
> +                                         new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                                           IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMaxBufferedDocs(2);
>      writer.setMergeFactor(50);
> @@ -2977,7 +2978,7 @@
>      ir.close();
>  
>      writer = new IndexWriter(dir,
> -                             new StandardAnalyzer(),
> +                             new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                               IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMergeFactor(3);
>      assertEquals(49, writer.numDocs());
> @@ -2995,7 +2996,7 @@
>    public void testExpungeDeletes3() throws IOException {
>      Directory dir = new MockRAMDirectory();
>      IndexWriter writer = new IndexWriter(dir,
> -                                         new StandardAnalyzer(),
> +                                         new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                                           IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMaxBufferedDocs(2);
>      writer.setMergeFactor(50);
> @@ -3024,7 +3025,7 @@
>      ir.close();
>  
>      writer = new IndexWriter(dir,
> -                             new StandardAnalyzer(),
> +                             new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT),
>                               IndexWriter.MaxFieldLength.LIMITED);
>      // Force many merges to happen
>      writer.setMergeFactor(3);
> @@ -4027,7 +4028,7 @@
>  
>      final List thrown = new ArrayList();
>  
> -    final IndexWriter writer = new IndexWriter(new MockRAMDirectory(), new StandardAnalyzer(), IndexWriter.MaxFieldLength.UNLIMITED) {
> +    final IndexWriter writer = new IndexWriter(new MockRAMDirectory(), new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.UNLIMITED) {
>          public void message(final String message) {
>            if (message.startsWith("now flush at close") && 0 == thrown.size()) {
>              thrown.add(null);
> @@ -4180,7 +4181,7 @@
>    // LUCENE-1448
>    public void testEndOffsetPositionStopFilter() throws Exception {
>      MockRAMDirectory dir = new MockRAMDirectory();
> -    IndexWriter w = new IndexWriter(dir, new StopAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter w = new IndexWriter(dir, new StopAnalyzer(Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.LIMITED);
>      Document doc = new Document();
>      Field f = new Field("field", "abcd the", Field.Store.NO, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS);
>      doc.add(f);
> @@ -4202,7 +4203,7 @@
>    // LUCENE-1448
>    public void testEndOffsetPositionStandard() throws Exception {
>      MockRAMDirectory dir = new MockRAMDirectory();
> -    IndexWriter w = new IndexWriter(dir, new StandardAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter w = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.LIMITED);
>      Document doc = new Document();
>      Field f = new Field("field", "abcd the  ", Field.Store.NO,
>          Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS);
> @@ -4232,7 +4233,7 @@
>    // LUCENE-1448
>    public void testEndOffsetPositionStandardEmptyField() throws Exception {
>      MockRAMDirectory dir = new MockRAMDirectory();
> -    IndexWriter w = new IndexWriter(dir, new StandardAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter w = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.LIMITED);
>      Document doc = new Document();
>      Field f = new Field("field", "", Field.Store.NO,
>                          Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS);
> @@ -4259,7 +4260,7 @@
>    // LUCENE-1448
>    public void testEndOffsetPositionStandardEmptyField2() throws Exception {
>      MockRAMDirectory dir = new MockRAMDirectory();
> -    IndexWriter w = new IndexWriter(dir, new StandardAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter w = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.LIMITED);
>      Document doc = new Document();
>  
>      Field f = new Field("field", "abcd", Field.Store.NO,
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterLockRelease.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterLockRelease.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterLockRelease.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterLockRelease.java Thu Oct 29 01:00:08 2009
> @@ -75,10 +75,10 @@
>          IndexWriter im;
>          FSDirectory dir = FSDirectory.open(this.__test_dir);
>          try {
> -            im = new IndexWriter(dir, new org.apache.lucene.analysis.standard.StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +            im = new IndexWriter(dir, new org.apache.lucene.analysis.standard.StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>          } catch (FileNotFoundException e) {
>              try {
> -                im = new IndexWriter(dir, new org.apache.lucene.analysis.standard.StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
> +                im = new IndexWriter(dir, new org.apache.lucene.analysis.standard.StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED);
>              } catch (FileNotFoundException e1) {
>              }
>          } finally {
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterMerging.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterMerging.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterMerging.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterMerging.java Thu Oct 29 01:00:08 2009
> @@ -56,7 +56,7 @@
>  
>      Directory merged = new MockRAMDirectory();
>  
> -    IndexWriter writer = new IndexWriter(merged, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter writer = new IndexWriter(merged, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMergeFactor(2);
>  
>      writer.addIndexesNoOptimize(new Directory[]{indexA, indexB});
> @@ -93,7 +93,7 @@
>    private void fillIndex(Directory dir, int start, int numDocs) throws IOException
>    {
>  
> -    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
> +    IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMergeFactor(2);
>      writer.setMaxBufferedDocs(2);
>  
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestNorms.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestNorms.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestNorms.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestNorms.java Thu Oct 29 01:00:08 2009
> @@ -63,7 +63,7 @@
>    protected void setUp() throws Exception {
>      super.setUp();
>      similarityOne = new SimilarityOne();
> -    anlzr = new StandardAnalyzer();
> +    anlzr = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>    }
>  
>    /**
>
> Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestOmitTf.java
> URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestOmitTf.java?rev=830815&r1=830814&r2=830815&view=diff
> ==============================================================================
> --- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestOmitTf.java (original)
> +++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestOmitTf.java Thu Oct 29 01:00:08 2009
> @@ -36,6 +36,7 @@
>  import org.apache.lucene.search.BooleanClause.Occur;
>  import org.apache.lucene.store.Directory;
>  import org.apache.lucene.store.MockRAMDirectory;
> +import org.apache.lucene.search.Explanation.IDFExplanation;
>  
>  
>  public class TestOmitTf extends LuceneTestCase {
> @@ -43,13 +44,20 @@
>    public static class SimpleSimilarity extends Similarity {
>      public float lengthNorm(String field, int numTerms) { return 1.0f; }
>      public float queryNorm(float sumOfSquaredWeights) { return 1.0f; }
> -    
>      public float tf(float freq) { return freq; }
> -    
>      public float sloppyFreq(int distance) { return 2.0f; }
> -    public float idf(Collection terms, Searcher searcher) { return 1.0f; }
>      public float idf(int docFreq, int numDocs) { return 1.0f; }
>      public float coord(int overlap, int maxOverlap) { return 1.0f; }
> +    public IDFExplanation idfExplain(Collection terms, Searcher searcher) throws IOException {
> +      return new IDFExplanation() {
> +        public float getIdf() {
> +          return 1.0f;
> +        }
> +        public String explain() {
> +          return "Inexplicable";
> +        }
> +      };
> +    }
>    }
>  
>  
> @@ -57,7 +65,7 @@
>    // omitTermFreqAndPositions bit in the FieldInfo
>    public void testOmitTermFreqAndPositions() throws Exception {
>      Directory ram = new MockRAMDirectory();
> -    Analyzer analyzer = new StandardAnalyzer();
> +    Analyzer analyzer = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>      IndexWriter writer = new IndexWriter(ram, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
>      Document d = new Document();
>          
> @@ -103,7 +111,7 @@
>    // omitTermFreqAndPositions for the same field works
>    public void testMixedMerge() throws Exception {
>      Directory ram = new MockRAMDirectory();
> -    Analyzer analyzer = new StandardAnalyzer();
> +    Analyzer analyzer = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>      IndexWriter writer = new IndexWriter(ram, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMaxBufferedDocs(3);
>      writer.setMergeFactor(2);
> @@ -156,7 +164,7 @@
>    // field, 
>    public void testMixedRAM() throws Exception {
>      Directory ram = new MockRAMDirectory();
> -    Analyzer analyzer = new StandardAnalyzer();
> +    Analyzer analyzer = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>      IndexWriter writer = new IndexWriter(ram, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMaxBufferedDocs(10);
>      writer.setMergeFactor(2);
> @@ -204,7 +212,7 @@
>    // Verifies no *.prx exists when all fields omit term freq:
>    public void testNoPrxFile() throws Throwable {
>      Directory ram = new MockRAMDirectory();
> -    Analyzer analyzer = new StandardAnalyzer();
> +    Analyzer analyzer = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>      IndexWriter writer = new IndexWriter(ram, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMaxBufferedDocs(3);
>      writer.setMergeFactor(2);
> @@ -235,7 +243,7 @@
>    // Test scores with one field with Term Freqs and one without, otherwise with equal content 
>    public void testBasic() throws Exception {
>      Directory dir = new MockRAMDirectory();  
> -    Analyzer analyzer = new StandardAnalyzer();
> +    Analyzer analyzer = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
>      IndexWriter writer = new IndexWriter(dir, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
>      writer.setMergeFactor(2);
>      writer.setMaxBufferedDocs(2);
>
>
>   


-- 
- Mark

http://www.lucidimagination.com




---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message