lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r886210 [1/4] - in /lucene/java/branches/flex_1458: ./ contrib/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/ contrib/analyzers/common/src/java/org/apache/l...
Date Wed, 02 Dec 2009 17:27:08 GMT
Author: markrmiller
Date: Wed Dec  2 17:26:34 2009
New Revision: 886210

URL: http://svn.apache.org/viewvc?rev=886210&view=rev
Log:
merge up to r886190

Added:
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/
      - copied from r886190, lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/BulgarianAnalyzer.java
      - copied unchanged from r886190, lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/BulgarianAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/BulgarianStemFilter.java
      - copied unchanged from r886190, lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/BulgarianStemFilter.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/BulgarianStemmer.java
      - copied unchanged from r886190, lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/BulgarianStemmer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/package.html
      - copied unchanged from r886190, lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/package.html
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechStemFilter.java
      - copied unchanged from r886190, lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechStemFilter.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechStemmer.java
      - copied unchanged from r886190, lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechStemmer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/resources/org/apache/lucene/analysis/bg/
      - copied from r886190, lucene/java/trunk/contrib/analyzers/common/src/resources/org/apache/lucene/analysis/bg/
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/resources/org/apache/lucene/analysis/bg/stopwords.txt
      - copied unchanged from r886190, lucene/java/trunk/contrib/analyzers/common/src/resources/org/apache/lucene/analysis/bg/stopwords.txt
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/test/org/apache/lucene/analysis/bg/
      - copied from r886190, lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/bg/
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/test/org/apache/lucene/analysis/bg/TestBulgarianAnalyzer.java
      - copied unchanged from r886190, lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/bg/TestBulgarianAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/test/org/apache/lucene/analysis/bg/TestBulgarianStemmer.java
      - copied unchanged from r886190, lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/bg/TestBulgarianStemmer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cz/TestCzechStemmer.java
      - copied unchanged from r886190, lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cz/TestCzechStemmer.java
    lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/reuters.first20.lines.txt
      - copied unchanged from r886190, lucene/java/trunk/contrib/benchmark/src/test/org/apache/lucene/benchmark/reuters.first20.lines.txt
    lucene/java/branches/flex_1458/contrib/regex/src/test/org/apache/lucene/search/regex/TestJakartaRegexpCapabilities.java
      - copied unchanged from r886190, lucene/java/trunk/contrib/regex/src/test/org/apache/lucene/search/regex/TestJakartaRegexpCapabilities.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/CharacterUtils.java
      - copied unchanged from r886190, lucene/java/trunk/src/java/org/apache/lucene/util/CharacterUtils.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/cache/DoubleBarrelLRUCache.java
      - copied unchanged from r886190, lucene/java/trunk/src/java/org/apache/lucene/util/cache/DoubleBarrelLRUCache.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/cache/BaseTestLRU.java
      - copied unchanged from r886190, lucene/java/trunk/src/test/org/apache/lucene/util/cache/BaseTestLRU.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/cache/TestDoubleBarrelLRUCache.java
      - copied unchanged from r886190, lucene/java/trunk/src/test/org/apache/lucene/util/cache/TestDoubleBarrelLRUCache.java
Modified:
    lucene/java/branches/flex_1458/   (props changed)
    lucene/java/branches/flex_1458/CHANGES.txt
    lucene/java/branches/flex_1458/NOTICE.txt
    lucene/java/branches/flex_1458/common-build.xml
    lucene/java/branches/flex_1458/contrib/   (props changed)
    lucene/java/branches/flex_1458/contrib/CHANGES.txt   (contents, props changed)
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/CompoundWordTokenFilterBase.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/DictionaryCompoundWordTokenFilter.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/ElisionFilter.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/miscellaneous/PatternAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/reverse/ReverseStringFilter.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/th/ThaiAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fr/TestElision.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/test/org/apache/lucene/analysis/reverse/TestReverseStringFilter.java
    lucene/java/branches/flex_1458/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/SmartChineseAnalyzer.java
    lucene/java/branches/flex_1458/contrib/benchmark/CHANGES.txt
    lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java
    lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/stats/Points.java
    lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/stats/TaskStats.java
    lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NearRealtimeReaderTask.java
    lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/PerfTask.java
    lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReportTask.java
    lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java
    lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Algorithm.java
    lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
    lucene/java/branches/flex_1458/contrib/highlighter/src/test/   (props changed)
    lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java
    lucene/java/branches/flex_1458/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
    lucene/java/branches/flex_1458/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java
    lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java
    lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java
    lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java
    lucene/java/branches/flex_1458/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestMultiAnalyzerQPHelper.java
    lucene/java/branches/flex_1458/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestMultiAnalyzerWrapper.java
    lucene/java/branches/flex_1458/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQPHelper.java
    lucene/java/branches/flex_1458/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQueryParserWrapper.java
    lucene/java/branches/flex_1458/contrib/regex/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java
    lucene/java/branches/flex_1458/contrib/snowball/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.java
    lucene/java/branches/flex_1458/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArraySet.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LowerCaseFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopAnalyzer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/AbstractField.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/Fieldable.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/BufferedDeletes.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocumentsWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/NormsWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/NormsWriterPerField.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/BooleanQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Collector.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MultiPhraseQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/NumericRangeQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/PhraseQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/PhraseScorer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Scorer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Similarity.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/TermQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/TermScorer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/TopDocs.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/TopFieldDocs.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/function/CustomScoreQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/SpanScorer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/SpanWeight.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/FSDirectory.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/cache/SimpleLRUCache.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/cache/SimpleMapCache.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/TestSnapshotDeletionPolicy.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestAnalyzers.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestCharArraySet.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestStopFilter.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestTeeSinkTokenFilter.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestNumberTools.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestAtomicUpdate.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReader.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderClone.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterReader.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestNRTReaderWithThreads.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestNorms.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentReader.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestStressIndexing.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestStressIndexing2.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTransactions.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/queryParser/TestMultiAnalyzer.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/queryParser/TestQueryParser.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/CheckHits.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestBoolean2.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestPositionIncrement.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestWildcard.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestBufferedIndexInput.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/LuceneTestCase.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestAttributeSource.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestIndexableBinaryStringTools.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/cache/TestSimpleLRUCache.java

Propchange: lucene/java/branches/flex_1458/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  2 17:26:34 2009
@@ -2,4 +2,4 @@
 /lucene/java/branches/lucene_2_9:817269-818600,829134,829881,831036
 /lucene/java/branches/lucene_2_9_back_compat_tests:818601-821336
 /lucene/java/branches/lucene_3_0:880793
-/lucene/java/trunk:824912-825292,827043-833960,880727-882265,883074
+/lucene/java/trunk:824912-825292,827043-833960,880727-886190

Modified: lucene/java/branches/flex_1458/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/CHANGES.txt?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/CHANGES.txt (original)
+++ lucene/java/branches/flex_1458/CHANGES.txt Wed Dec  2 17:26:34 2009
@@ -2,6 +2,60 @@
 $Id$
 
 ======================= Trunk (not yet released) =======================
+Changes in backwards compatibility policy
+
+Changes in runtime behavior
+
+API Changes
+
+* LUCENE-2076: Rename FSDirectory.getFile -> getDirectory.  (George
+  Aroush via Mike McCandless)
+
+* LUCENE-1260: Change norm encode (float->byte) and decode
+  (byte->float) to be instance methods not static methods.  This way a
+  custom Similarity can alter how norms are encoded, though they must
+  still be encoded as a single byte (Johan Kindgren via Mike
+  McCandless)
+
+Bug fixes
+
+* LUCENE-2092: BooleanQuery was ignoring disableCoord in its hashCode
+  and equals methods, cause bad things to happen when caching
+  BooleanQueries.  (Chris Hostetter, Mike McCandless)
+
+New features
+
+* LUCENE-2069: Added Unicode 4 support to CharArraySet. Due to the switch
+  to Java 5, supplementary characters are now lowercased correctly if the
+  set is created as case insensitive.
+  CharArraySet now requires a Version argument to preserve 
+  backwards compatibility. If Version < 3.1 is passed to the constructor, 
+  CharArraySet yields the old behavior. (Simon Willnauer)
+  
+* LUCENE-2069: Added Unicode 4 support to LowerCaseFilter. Due to the switch
+  to Java 5, supplementary characters are now lowercased correctly.
+  LowerCaseFilter now requires a Version argument to preserve 
+  backwards compatibility. If Version < 3.1 is passed to the constructor, 
+  LowerCaseFilter yields the old behavior. (Simon Willnauer, Robert Muir)  
+
+Optimizations
+
+* LUCENE-2086: When resolving deleted terms, do so in term sort order
+  for better performance. (Bogdan Ghidireac via Mike McCandless)
+
+* LUCENE-2075: Terms dict cache is now shared across threads instead
+  of being stored separately in thread local storage.  Also fixed
+  terms dict so that the cache is used when seeking the thread local
+  term enum, which will be important for MultiTermQuery impls that do
+  lots of seeking (Mike McCandless, Uwe Schindler, Robert Muir, Yonik
+  Seeley)
+
+Build
+
+Test Cases
+
+* LUCENE-1844: Speed up the unit tests (Mark Miller, Erick Erickson,
+  Mike McCandless)
 
 ======================= Release 3.0.0 2009-11-25 =======================
 
@@ -39,6 +93,9 @@
   this is a change in the default from 2.9, when these methods were
   previously deprecated.  (Mike McCandless)
 
+* LUCENE-1753: Make not yet final TokenStreams final to enforce 
+  decorator pattern. (Uwe Schindler)
+
 Changes in runtime behavior
 
 * LUCENE-1677: Remove the system property to set SegmentReader class
@@ -72,20 +129,31 @@
 
 API Changes
 
-* LUCENE-1257, LUCENE-1984, LUCENE-1985, LUCENE-2057: Port to Java 1.5.
-  (Uwe Schindler, Robert Muir, Karl Wettin, Paul Elschot, Kay Kay, Shai Erera)
+* LUCENE-1257, LUCENE-1984, LUCENE-1985, LUCENE-2057, LUCENE-1833, LUCENE-2012,
+  LUCENE-1998: Port to Java 1.5:
+
+  - Add generics to public and internal APIs (see below).
+  - Replace new Integer(int), new Double(double),... by static valueOf() calls.
+  - Replace for-loops with Iterator by foreach loops.
+  - Replace StringBuffer with StringBuilder.
+  - Replace o.a.l.util.Parameter by Java 5 enums (see below).
+  - Add @Override annotations.
+  (Uwe Schindler, Robert Muir, Karl Wettin, Paul Elschot, Kay Kay, Shai Erera,
+  DM Smith)
 
 * Generify Lucene API:
 
   - TokenStream/AttributeSource: Now addAttribute()/getAttribute() return an
-    instance of the requested attribute interface and no cast needed anymore.
+    instance of the requested attribute interface and no cast needed anymore
+    (LUCENE-1855).
   - NumericRangeQuery, NumericRangeFilter, and FieldCacheRangeFilter
-    now have Integer, Long, Float, Double as type param.
-  - Document.getFields() returns List<Fieldable>
+    now have Integer, Long, Float, Double as type param (LUCENE-1857).
+  - Document.getFields() returns List<Fieldable>.
   - Query.extractTerms(Set<Term>)
   - CharArraySet and stop word sets in core/contrib
-  - PriorityQueue
+  - PriorityQueue (LUCENE-1935)
   - TopDocCollector
+  - DisjunctionMaxQuery (LUCENE-1984)
   - MultiTermQueryWrapperFilter
   - CloseableThreadLocal
   - MapOfSets
@@ -98,7 +166,7 @@
   LUCENE-1972, LUCENE-1978, LUCENE-944, LUCENE-1979, LUCENE-1973, LUCENE-2011:
   Remove deprecated methods/constructors/classes:
 
-  - All String/File directory paths in IndexReader /
+  - Remove all String/File directory paths in IndexReader /
     IndexSearcher / IndexWriter.
   - Remove FSDirectory.getDirectory()
   - Make FSDirectory abstract.
@@ -112,13 +180,13 @@
   - Remove SpanQuery.getTerms().
   - Remove ExtendedFieldCache, custom and auto caches, SortField.AUTO.
   - Remove old-style custom sort.
-  - Remove Legacy search setting in SortField.
+  - Remove legacy search setting in SortField.
   - Remove Hits and all references from core and contrib.
   - Remove HitCollector and its TopDocs support implementations.
   - Remove term field and accessors in MultiTermQuery
     (and fix Highlighter).
-  - Remove methods in BooleanQuery.
-  - Remove methods in Similarity.
+  - Remove deprecated methods in BooleanQuery.
+  - Remove deprecated methods in Similarity.
   - Remove BoostingTermQuery.
   - Remove MultiValueSource.
   - Remove Scorer.explain(int).
@@ -128,9 +196,6 @@
   protected; add expert ctor to directly specify reader, subReaders
   and docStarts.  (John Wang, Tim Smith via Mike McCandless)
 
-* LUCENE-1753: Make not yet final TokenStreams final to enforce 
-  decorator pattern. (Uwe Schindler)
-
 * LUCENE-1945: All public classes that have a close() method now
   also implement java.io.Closeable (IndexReader, IndexWriter, Directory,...).
   (Uwe Schindler)
@@ -154,6 +219,14 @@
 * LUCENE-2088: addAttribute() should only accept interfaces that
   extend Attribute. (Shai Erera, Uwe Schindler)
 
+* LUCENE-2045: Fix silly FileNotFoundException hit if you enable
+  infoStream on IndexWriter and then add an empty document and commit
+  (Shai Erera via Mike McCandless)
+
+* LUCENE-2046: IndexReader should not see the index as changed, after
+  IndexWriter.prepareCommit has been called but before
+  IndexWriter.commit is called. (Peter Keegan via Mike McCandless)
+
 New features
 
 * LUCENE-1933: Provide a convenience AttributeFactory that creates a
@@ -175,6 +248,9 @@
 * LUCENE-2006: Optimization of FieldDocSortedHitQueue to always
   use Comparable<?> interface.  (Uwe Schindler, Mark Miller)
 
+* LUCENE-2087: Remove recursion in NumericRangeTermEnum.
+  (Uwe Schindler)
+
 Build
 
 * LUCENE-486: Remove test->demo dependencies. (Michael Busch)
@@ -221,14 +297,6 @@
    char (U+FFFD) during indexing, to prevent silent index corruption.
    (Peter Keegan, Mike McCandless)
 
- * LUCENE-2045: Fix silly FileNotFoundException hit if you enable
-   infoStream on IndexWriter and then add an empty document and commit
-   (Shai Erera via Mike McCandless)
-
- * LUCENE-2046: IndexReader should not see the index as changed, after
-   IndexWriter.prepareCommit has been called but before
-   IndexWriter.commit is called. (Peter Keegan via Mike McCandless)
-
 API Changes
 
  * Un-deprecate search(Weight weight, Filter filter, int n) from

Modified: lucene/java/branches/flex_1458/NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/NOTICE.txt?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/NOTICE.txt (original)
+++ lucene/java/branches/flex_1458/NOTICE.txt Wed Dec  2 17:26:34 2009
@@ -20,6 +20,11 @@
 contrib/analyzers/common/src/resources/org/apache/lucene/analysis/fa/stopwords.txt.
 See http://members.unine.ch/jacques.savoy/clef/index.html.
 
+The Bulgarian analyzer (contrib/analyzers) comes with a default
+stopword list that is BSD-licensed created by Jacques Savoy.  The file resides in
+contrib/analyzers/common/src/resources/org/apache/lucene/analysis/bg/stopwords.txt.
+See http://members.unine.ch/jacques.savoy/clef/index.html.
+
 Includes lib/servlet-api-2.4.jar from  Apache Tomcat
 
 The SmartChineseAnalyzer source code (under contrib/analyzers) was

Modified: lucene/java/branches/flex_1458/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/common-build.xml?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/common-build.xml (original)
+++ lucene/java/branches/flex_1458/common-build.xml Wed Dec  2 17:26:34 2009
@@ -42,7 +42,7 @@
   <property name="Name" value="Lucene"/>
   <property name="dev.version" value="3.1-dev"/>
   <property name="version" value="${dev.version}"/>
-  <property name="compatibility.tag" value="flex_1458_3_0_back_compat_tests_20091125"/>
+  <property name="compatibility.tag" value="flex_1458_3_0_back_compat_tests_20091202"/>
   <property name="spec.version" value="${version}"/>	
   <property name="year" value="2000-${current.year}"/>
   <property name="final.name" value="lucene-${name}-${version}"/>

Propchange: lucene/java/branches/flex_1458/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  2 17:26:34 2009
@@ -2,4 +2,4 @@
 /lucene/java/branches/lucene_2_9/contrib:817269-818600,825998,829134,829816,829881,831036
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib:818601-821336
 /lucene/java/branches/lucene_3_0/contrib:880793
-/lucene/java/trunk/contrib:824912-825292,827043-833960,880727-882265,883074
+/lucene/java/trunk/contrib:824912-825292,827043-833960,880727-886190

Modified: lucene/java/branches/flex_1458/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/CHANGES.txt?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/CHANGES.txt (original)
+++ lucene/java/branches/flex_1458/contrib/CHANGES.txt Wed Dec  2 17:26:34 2009
@@ -2,6 +2,22 @@
 
 ======================= Trunk (not yet released) =======================
 
+Bug fixes
+
+ * LUCENE-2068: Fixed ReverseStringFilter which was not aware of supplementary
+   characters. During reverse the filter created unpaired surrogates, which
+   will be replaced by U+FFFD by the indexer, but not at query time. The filter
+   now reverses supplementary characters correctly if used with Version > 3.0.
+   (Simon Willnauer, Robert Muir)
+   
+New features
+
+ * LUCENE-2067: Add a Czech light stemmer. CzechAnalyzer will now stem words
+   when Version is set to 3.1 or higher.  (Robert Muir)
+   
+ * LUCENE-2062: Add a Bulgarian analyzer.  (Robert Muir, Simon Willnauer)
+   
+
 ======================= Release 3.0.0 2009-11-25 =======================
 
 Changes in backwards compatibility policy

Propchange: lucene/java/branches/flex_1458/contrib/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  2 17:26:34 2009
@@ -2,4 +2,4 @@
 /lucene/java/branches/lucene_2_9/contrib/CHANGES.txt:817269-818600,825998,826775,829134,829816,829881,831036
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/CHANGES.txt:818601-821336
 /lucene/java/branches/lucene_3_0/contrib/CHANGES.txt:880793
-/lucene/java/trunk/contrib/CHANGES.txt:829439-833960,880727-882265,883074
+/lucene/java/trunk/contrib/CHANGES.txt:829439-833960,880727-886190

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java Wed Dec  2 17:26:34 2009
@@ -129,7 +129,7 @@
    *          a stopword set
    */
   public ArabicAnalyzer(Version matchVersion, Set<?> stopwords){
-    stoptable = CharArraySet.unmodifiableSet(CharArraySet.copy(stopwords));
+    stoptable = CharArraySet.unmodifiableSet(CharArraySet.copy(matchVersion, stopwords));
     this.matchVersion = matchVersion;
   }
 
@@ -138,7 +138,7 @@
    * @deprecated use {@link #ArabicAnalyzer(Version, Set)} instead
    */
   public ArabicAnalyzer( Version matchVersion, String... stopwords ) {
-    this(matchVersion, StopFilter.makeStopSet( stopwords ));
+    this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords ));
   }
 
   /**
@@ -168,10 +168,9 @@
   @Override
   public final TokenStream tokenStream(String fieldName, Reader reader) {
     TokenStream result = new ArabicLetterTokenizer( reader );
-    result = new LowerCaseFilter(result);
+    result = new LowerCaseFilter(matchVersion, result);
     // the order here is important: the stopword list is not normalized!
-    result = new StopFilter( StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                             result, stoptable );
+    result = new StopFilter( matchVersion, result, stoptable );
     result = new ArabicNormalizationFilter( result );
     result = new ArabicStemFilter( result );
 
@@ -198,10 +197,9 @@
     if (streams == null) {
       streams = new SavedStreams();
       streams.source = new ArabicLetterTokenizer(reader);
-      streams.result = new LowerCaseFilter(streams.source);
+      streams.result = new LowerCaseFilter(matchVersion, streams.source);
       // the order here is important: the stopword list is not normalized!
-      streams.result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                                      streams.result, stoptable);
+      streams.result = new StopFilter( matchVersion, streams.result, stoptable);
       streams.result = new ArabicNormalizationFilter(streams.result);
       streams.result = new ArabicStemFilter(streams.result);
       setPreviousTokenStream(streams);

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java Wed Dec  2 17:26:34 2009
@@ -87,8 +87,8 @@
   
   private static class DefaultSetHolder {
     static final Set<?> DEFAULT_STOP_SET = CharArraySet
-        .unmodifiableSet(new CharArraySet(Arrays.asList(BRAZILIAN_STOP_WORDS),
-            false));
+        .unmodifiableSet(new CharArraySet(Version.LUCENE_CURRENT, 
+            Arrays.asList(BRAZILIAN_STOP_WORDS), false));
   }
 
 	/**
@@ -120,7 +120,7 @@
    *          a stopword set
    */
   public BrazilianAnalyzer(Version matchVersion, Set<?> stopwords) {
-    stoptable = CharArraySet.unmodifiableSet(CharArraySet.copy(stopwords));
+    stoptable = CharArraySet.unmodifiableSet(CharArraySet.copy(matchVersion, stopwords));
     this.matchVersion = matchVersion;
   }
 
@@ -136,7 +136,7 @@
       Set<?> stemExclusionSet) {
     this(matchVersion, stopwords);
     excltable = CharArraySet.unmodifiableSet(CharArraySet
-        .copy(stemExclusionSet));
+        .copy(matchVersion, stemExclusionSet));
   }
 
 	/**
@@ -144,7 +144,7 @@
 	 * @deprecated use {@link #BrazilianAnalyzer(Version, Set)} instead
 	 */
   public BrazilianAnalyzer(Version matchVersion, String... stopwords) {
-    this(matchVersion, StopFilter.makeStopSet(stopwords));
+    this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));
   }
 
   /**
@@ -169,7 +169,7 @@
 	 * @deprecated use {@link #BrazilianAnalyzer(Version, Set, Set)} instead
 	 */
 	public void setStemExclusionTable( String... exclusionlist ) {
-		excltable = StopFilter.makeStopSet( exclusionlist );
+		excltable = StopFilter.makeStopSet( matchVersion, exclusionlist );
 		setPreviousTokenStream(null); // force a new stemmer to be created
 	}
 	/**
@@ -199,10 +199,9 @@
 	@Override
 	public final TokenStream tokenStream(String fieldName, Reader reader) {
                 TokenStream result = new StandardTokenizer( matchVersion, reader );
-		result = new LowerCaseFilter( result );
+		result = new LowerCaseFilter( matchVersion, result );
 		result = new StandardFilter( result );
-		result = new StopFilter( StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                                         result, stoptable );
+		result = new StopFilter( matchVersion, result, stoptable );
 		result = new BrazilianStemFilter( result, excltable );
 		return result;
 	}
@@ -227,10 +226,9 @@
       if (streams == null) {
         streams = new SavedStreams();
         streams.source = new StandardTokenizer(matchVersion, reader);
-        streams.result = new LowerCaseFilter(streams.source);
+        streams.result = new LowerCaseFilter(matchVersion, streams.source);
         streams.result = new StandardFilter(streams.result);
-        streams.result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                                        streams.result, stoptable);
+        streams.result = new StopFilter(matchVersion, streams.result, stoptable);
         streams.result = new BrazilianStemFilter(streams.result, excltable);
         setPreviousTokenStream(streams);
       } else {

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java Wed Dec  2 17:26:34 2009
@@ -68,7 +68,7 @@
   
   private static class DefaultSetHolder {
     static final Set<?> DEFAULT_STOP_SET = CharArraySet
-        .unmodifiableSet(new CharArraySet(Arrays.asList(STOP_WORDS),
+        .unmodifiableSet(new CharArraySet(Version.LUCENE_CURRENT, Arrays.asList(STOP_WORDS),
             false));
   }
   /**
@@ -95,7 +95,7 @@
    *          a stopword set
    */
   public CJKAnalyzer(Version matchVersion, Set<?> stopwords){
-    stopTable = CharArraySet.unmodifiableSet(CharArraySet.copy(stopwords));
+    stopTable = CharArraySet.unmodifiableSet(CharArraySet.copy(matchVersion, stopwords));
     this.matchVersion = matchVersion;
   }
 
@@ -106,7 +106,7 @@
    * @deprecated use {@link #CJKAnalyzer(Version, Set)} instead
    */
   public CJKAnalyzer(Version matchVersion, String... stopWords) {
-    stopTable = StopFilter.makeStopSet(stopWords);
+    stopTable = StopFilter.makeStopSet(matchVersion, stopWords);
     this.matchVersion = matchVersion;
   }
 
@@ -122,8 +122,7 @@
    */
   @Override
   public final TokenStream tokenStream(String fieldName, Reader reader) {
-    return new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                          new CJKTokenizer(reader), stopTable);
+    return new StopFilter(matchVersion, new CJKTokenizer(reader), stopTable);
   }
   
   private class SavedStreams {
@@ -147,8 +146,7 @@
     if (streams == null) {
       streams = new SavedStreams();
       streams.source = new CJKTokenizer(reader);
-      streams.result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                                      streams.source, stopTable);
+      streams.result = new StopFilter(matchVersion, streams.source, stopTable);
       setPreviousTokenStream(streams);
     } else {
       streams.source.reset(reader);

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java Wed Dec  2 17:26:34 2009
@@ -24,6 +24,7 @@
 import org.apache.lucene.analysis.TokenFilter;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.tokenattributes.TermAttribute;
+import org.apache.lucene.util.Version;
 
 /**
  * A {@link TokenFilter} with a stop word table.  
@@ -63,7 +64,7 @@
     public ChineseFilter(TokenStream in) {
         super(in);
 
-        stopTable = new CharArraySet(Arrays.asList(STOP_WORDS), false);
+        stopTable = new CharArraySet(Version.LUCENE_CURRENT, Arrays.asList(STOP_WORDS), false);
         termAtt = addAttribute(TermAttribute.class);
     }
 

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/CompoundWordTokenFilterBase.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/CompoundWordTokenFilterBase.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/CompoundWordTokenFilterBase.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/CompoundWordTokenFilterBase.java Wed Dec  2 17:26:34 2009
@@ -20,7 +20,6 @@
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.Set;
 
@@ -34,9 +33,18 @@
 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;
 
 /**
- * Base class for decomposition token filters.
+ * Base class for decomposition token filters. <a name="version"/>
+ * <p>
+ * You must specify the required {@link Version} compatibility when creating
+ * CompoundWordTokenFilterBase:
+ * <ul>
+ * <li>As of 3.1, CompoundWordTokenFilterBase correctly handles Unicode 4.0
+ * supplementary characters in strings and char arrays provided as compound word
+ * dictionaries.
+ * </ul>
  */
 public abstract class CompoundWordTokenFilterBase extends TokenFilter {
   /**
@@ -55,7 +63,7 @@
   public static final int DEFAULT_MAX_SUBWORD_SIZE = 15;
   
   protected final CharArraySet dictionary;
-  protected final LinkedList tokens;
+  protected final LinkedList<Token> tokens;
   protected final int minWordSize;
   protected final int minSubwordSize;
   protected final int maxSubwordSize;
@@ -69,31 +77,72 @@
   private PayloadAttribute payloadAtt;
   
   private final Token wrapper = new Token();
-
+  /**
+   * @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, String[], int, int, int, boolean) instead
+   */
   protected CompoundWordTokenFilterBase(TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
-    this(input,makeDictionary(dictionary),minWordSize,minSubwordSize,maxSubwordSize, onlyLongestMatch);
+    this(Version.LUCENE_30, input, makeDictionary(dictionary),minWordSize,minSubwordSize,maxSubwordSize, onlyLongestMatch);
   }
   
+  /**
+   * @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, String[], boolean) instead
+   */
   protected CompoundWordTokenFilterBase(TokenStream input, String[] dictionary, boolean onlyLongestMatch) {
-    this(input,makeDictionary(dictionary),DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, onlyLongestMatch);
+    this(Version.LUCENE_30, input, makeDictionary(dictionary),DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, onlyLongestMatch);
+  }
+  
+  /**
+   * @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, Set, boolean) instead
+   */
+  protected CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary, boolean onlyLongestMatch) {
+    this(Version.LUCENE_30, input, dictionary,DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, onlyLongestMatch);
+  }
+  
+  /**
+   * @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, String[]) instead
+   */
+  protected CompoundWordTokenFilterBase(TokenStream input, String[] dictionary) {
+    this(Version.LUCENE_30, input, makeDictionary(dictionary),DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, false);
+  }
+  
+  /**
+   * @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, Set) instead
+   */
+  protected CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary) {
+    this(Version.LUCENE_30, input, dictionary,DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, false);
   }
 
-  protected CompoundWordTokenFilterBase(TokenStream input, Set dictionary, boolean onlyLongestMatch) {
-    this(input,dictionary,DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, onlyLongestMatch);
+  /**
+   * @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, Set[], int, int, int, boolean) instead
+   */
+  protected CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
+    this(Version.LUCENE_30, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
+  }
+  
+  protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
+    this(matchVersion, input,makeDictionary(dictionary),minWordSize,minSubwordSize,maxSubwordSize, onlyLongestMatch);
+  }
+  
+  protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary, boolean onlyLongestMatch) {
+    this(matchVersion, input,makeDictionary(dictionary),DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, onlyLongestMatch);
   }
 
-  protected CompoundWordTokenFilterBase(TokenStream input, String[] dictionary) {
-    this(input,makeDictionary(dictionary),DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, false);
+  protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set dictionary, boolean onlyLongestMatch) {
+    this(matchVersion, input,dictionary,DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, onlyLongestMatch);
+  }
+
+  protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary) {
+    this(matchVersion, input,makeDictionary(dictionary),DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, false);
   }
 
-  protected CompoundWordTokenFilterBase(TokenStream input, Set dictionary) {
-    this(input,dictionary,DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, false);
+  protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set dictionary) {
+    this(matchVersion, input,dictionary,DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, false);
   }
 
-  protected CompoundWordTokenFilterBase(TokenStream input, Set dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
+  protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
     super(input);
     
-    this.tokens=new LinkedList();
+    this.tokens=new LinkedList<Token>();
     this.minWordSize=minWordSize;
     this.minSubwordSize=minSubwordSize;
     this.maxSubwordSize=maxSubwordSize;
@@ -102,7 +151,7 @@
     if (dictionary instanceof CharArraySet) {
       this.dictionary = (CharArraySet) dictionary;
     } else {
-      this.dictionary = new CharArraySet(dictionary.size(), false);
+      this.dictionary = new CharArraySet(matchVersion, dictionary.size(), false);
       addAllLowerCase(this.dictionary, dictionary);
     }
     
@@ -121,9 +170,13 @@
    * @param dictionary 
    * @return {@link Set} of lowercased terms 
    */
-  public static final Set makeDictionary(final String[] dictionary) {
+  public static final Set<?> makeDictionary(final String[] dictionary) {
+    return makeDictionary(Version.LUCENE_30, dictionary);
+  }
+  
+  public static final Set<?> makeDictionary(final Version matchVersion, final String[] dictionary) {
     // is the below really case insensitive? 
-    CharArraySet dict = new CharArraySet(dictionary.length, false);
+    CharArraySet dict = new CharArraySet(matchVersion, dictionary.length, false);
     addAllLowerCase(dict, Arrays.asList(dictionary));
     return dict;
   }
@@ -140,11 +193,11 @@
   @Override
   public final boolean incrementToken() throws IOException {
     if (tokens.size() > 0) {
-      setToken((Token)tokens.removeFirst());
+      setToken(tokens.removeFirst());
       return true;
     }
 
-    if (input.incrementToken() == false)
+    if (!input.incrementToken())
       return false;
     
     wrapper.setTermBuffer(termAtt.termBuffer(), 0, termAtt.termLength());
@@ -158,18 +211,16 @@
     decompose(wrapper);
 
     if (tokens.size() > 0) {
-      setToken((Token)tokens.removeFirst());
+      setToken(tokens.removeFirst());
       return true;
     } else {
       return false;
     }
   }
   
-  protected static final void addAllLowerCase(Set target, Collection col) {
-    Iterator iter=col.iterator();
-    
-    while (iter.hasNext()) {
-      target.add(((String)iter.next()).toLowerCase());
+  protected static final void addAllLowerCase(Set<Object> target, Collection<String> col) {
+    for (String string : col) {
+      target.add(string.toLowerCase());
     }
   }
   

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/DictionaryCompoundWordTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/DictionaryCompoundWordTokenFilter.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/DictionaryCompoundWordTokenFilter.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/DictionaryCompoundWordTokenFilter.java Wed Dec  2 17:26:34 2009
@@ -23,6 +23,7 @@
 import org.apache.lucene.analysis.Token;
 import org.apache.lucene.analysis.TokenFilter; // for javadocs
 import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.util.Version;
 
 /**
  * A {@link TokenFilter} that decomposes compound words found in many Germanic languages.
@@ -33,7 +34,9 @@
  * </p>
  */
 public class DictionaryCompoundWordTokenFilter extends CompoundWordTokenFilterBase {
+  
   /**
+   * Creates a new {@link DictionaryCompoundWordTokenFilter}
    * 
    * @param input the {@link TokenStream} to process
    * @param dictionary the word dictionary to match against
@@ -41,33 +44,39 @@
    * @param minSubwordSize only subwords longer than this get to the output stream
    * @param maxSubwordSize only subwords shorter than this get to the output stream
    * @param onlyLongestMatch Add only the longest matching subword to the stream
+   * @deprecated use {@link #DictionaryCompoundWordTokenFilter(Version, TokenStream, String[], int, int, int, boolean)} instead
    */
   public DictionaryCompoundWordTokenFilter(TokenStream input, String[] dictionary,
       int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
-    super(input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
+    super(Version.LUCENE_30, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
   }
 
   /**
-   * 
+   * Creates a new {@link DictionaryCompoundWordTokenFilter}
+   *  
    * @param input the {@link TokenStream} to process
    * @param dictionary the word dictionary to match against
+   * @deprecated use {@link #DictionaryCompoundWordTokenFilter(Version, TokenStream, String[])} instead 
    */
   public DictionaryCompoundWordTokenFilter(TokenStream input, String[] dictionary) {
-    super(input, dictionary);
+    super(Version.LUCENE_30, input, dictionary);
   }
 
   /**
-   * 
+   * Creates a new {@link DictionaryCompoundWordTokenFilter}
+   *  
    * @param input the {@link TokenStream} to process
    * @param dictionary the word dictionary to match against. If this is a {@link org.apache.lucene.analysis.CharArraySet CharArraySet} it must have set ignoreCase=false and only contain
-   *        lower case strings. 
+   *        lower case strings.
+   * @deprecated use {@link #DictionaryCompoundWordTokenFilter(Version, TokenStream, Set)} instead 
    */
   public DictionaryCompoundWordTokenFilter(TokenStream input, Set dictionary) {
-    super(input, dictionary);
+    super(Version.LUCENE_30, input, dictionary);
   }
 
   /**
-   * 
+   * Creates a new {@link DictionaryCompoundWordTokenFilter}
+   *  
    * @param input the {@link TokenStream} to process
    * @param dictionary the word dictionary to match against. If this is a {@link org.apache.lucene.analysis.CharArraySet CharArraySet} it must have set ignoreCase=false and only contain
    *        lower case strings. 
@@ -75,10 +84,104 @@
    * @param minSubwordSize only subwords longer than this get to the output stream
    * @param maxSubwordSize only subwords shorter than this get to the output stream
    * @param onlyLongestMatch Add only the longest matching subword to the stream
+   * @deprecated use {@link #DictionaryCompoundWordTokenFilter(Version, TokenStream, Set, int, int, int, boolean)} instead
    */
   public DictionaryCompoundWordTokenFilter(TokenStream input, Set dictionary,
       int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
-    super(input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
+    super(Version.LUCENE_30, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
+  }
+  
+  /**
+   * Creates a new {@link DictionaryCompoundWordTokenFilter}
+   * 
+   * @param matchVersion
+   *          Lucene version to enable correct Unicode 4.0 behavior in the
+   *          dictionaries if Version > 3.0. See <a
+   *          href="CompoundWordTokenFilterBase#version"
+   *          >CompoundWordTokenFilterBase</a> for details.
+   * @param input
+   *          the {@link TokenStream} to process
+   * @param dictionary
+   *          the word dictionary to match against
+   * @param minWordSize
+   *          only words longer than this get processed
+   * @param minSubwordSize
+   *          only subwords longer than this get to the output stream
+   * @param maxSubwordSize
+   *          only subwords shorter than this get to the output stream
+   * @param onlyLongestMatch
+   *          Add only the longest matching subword to the stream
+   */
+  public DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, String[] dictionary,
+      int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
+    super(matchVersion, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
+  }
+
+  /**
+   * Creates a new {@link DictionaryCompoundWordTokenFilter}
+   * 
+   * @param matchVersion
+   *          Lucene version to enable correct Unicode 4.0 behavior in the
+   *          dictionaries if Version > 3.0. See <a
+   *          href="CompoundWordTokenFilterBase#version"
+   *          >CompoundWordTokenFilterBase</a> for details.
+   * 
+   * @param input
+   *          the {@link TokenStream} to process
+   * @param dictionary
+   *          the word dictionary to match against
+   */
+  public DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, String[] dictionary) {
+    super(matchVersion, input, dictionary);
+  }
+  
+  /**
+   * Creates a new {@link DictionaryCompoundWordTokenFilter}
+   * 
+   * @param matchVersion
+   *          Lucene version to enable correct Unicode 4.0 behavior in the
+   *          dictionaries if Version > 3.0. See <a
+   *          href="CompoundWordTokenFilterBase#version"
+   *          >CompoundWordTokenFilterBase</a> for details.
+   * @param input
+   *          the {@link TokenStream} to process
+   * @param dictionary
+   *          the word dictionary to match against. If this is a
+   *          {@link org.apache.lucene.analysis.CharArraySet CharArraySet} it
+   *          must have set ignoreCase=false and only contain lower case
+   *          strings.
+   */
+  public DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, Set dictionary) {
+    super(matchVersion, input, dictionary);
+  }
+  
+  /**
+   * Creates a new {@link DictionaryCompoundWordTokenFilter}
+   * 
+   * @param matchVersion
+   *          Lucene version to enable correct Unicode 4.0 behavior in the
+   *          dictionaries if Version > 3.0. See <a
+   *          href="CompoundWordTokenFilterBase#version"
+   *          >CompoundWordTokenFilterBase</a> for details.
+   * @param input
+   *          the {@link TokenStream} to process
+   * @param dictionary
+   *          the word dictionary to match against. If this is a
+   *          {@link org.apache.lucene.analysis.CharArraySet CharArraySet} it
+   *          must have set ignoreCase=false and only contain lower case
+   *          strings.
+   * @param minWordSize
+   *          only words longer than this get processed
+   * @param minSubwordSize
+   *          only subwords longer than this get to the output stream
+   * @param maxSubwordSize
+   *          only subwords shorter than this get to the output stream
+   * @param onlyLongestMatch
+   *          Add only the longest matching subword to the stream
+   */
+  public DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, Set dictionary,
+      int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
+    super(matchVersion, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
   }
 
   @Override

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java Wed Dec  2 17:26:34 2009
@@ -28,6 +28,7 @@
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.compound.hyphenation.Hyphenation;
 import org.apache.lucene.analysis.compound.hyphenation.HyphenationTree;
+import org.apache.lucene.util.Version;
 import org.xml.sax.InputSource;
 
 /**
@@ -41,8 +42,119 @@
 public class HyphenationCompoundWordTokenFilter extends
     CompoundWordTokenFilterBase {
   private HyphenationTree hyphenator;
+  
+  /**
+   * Creates a new {@link HyphenationCompoundWordTokenFilter} instance.
+   *  
+   * @param matchVersion
+   *          Lucene version to enable correct Unicode 4.0 behavior in the
+   *          dictionaries if Version > 3.0. See <a
+   *          href="CompoundWordTokenFilterBase#version"
+   *          >CompoundWordTokenFilterBase</a> for details.
+   * @param input
+   *          the {@link TokenStream} to process
+   * @param hyphenator
+   *          the hyphenation pattern tree to use for hyphenation
+   * @param dictionary
+   *          the word dictionary to match against
+   * @param minWordSize
+   *          only words longer than this get processed
+   * @param minSubwordSize
+   *          only subwords longer than this get to the output stream
+   * @param maxSubwordSize
+   *          only subwords shorter than this get to the output stream
+   * @param onlyLongestMatch
+   *          Add only the longest matching subword to the stream
+   */
+  public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input,
+      HyphenationTree hyphenator, String[] dictionary, int minWordSize,
+      int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
+    this(input, hyphenator, makeDictionary(dictionary), minWordSize,
+        minSubwordSize, maxSubwordSize, onlyLongestMatch);
+  }
+
+  /**
+   * Creates a new {@link HyphenationCompoundWordTokenFilter} instance.
+   *  
+   * @param matchVersion
+   *          Lucene version to enable correct Unicode 4.0 behavior in the
+   *          dictionaries if Version > 3.0. See <a
+   *          href="CompoundWordTokenFilterBase#version"
+   *          >CompoundWordTokenFilterBase</a> for details.
+   * @param input
+   *          the {@link TokenStream} to process
+   * @param hyphenator
+   *          the hyphenation pattern tree to use for hyphenation
+   * @param dictionary
+   *          the word dictionary to match against
+   */
+  public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input,
+      HyphenationTree hyphenator, String[] dictionary) {
+    this(input, hyphenator, makeDictionary(dictionary), DEFAULT_MIN_WORD_SIZE,
+        DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE, false);
+  }
+
+  /**
+   * Creates a new {@link HyphenationCompoundWordTokenFilter} instance. 
+   * 
+   * @param matchVersion
+   *          Lucene version to enable correct Unicode 4.0 behavior in the
+   *          dictionaries if Version > 3.0. See <a
+   *          href="CompoundWordTokenFilterBase#version"
+   *          >CompoundWordTokenFilterBase</a> for details.
+   * @param input
+   *          the {@link TokenStream} to process
+   * @param hyphenator
+   *          the hyphenation pattern tree to use for hyphenation
+   * @param dictionary
+   *          the word dictionary to match against. If this is a
+   *          {@link org.apache.lucene.analysis.CharArraySet CharArraySet} it
+   *          must have set ignoreCase=false and only contain lower case
+   *          strings.
+   */
+  public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input,
+      HyphenationTree hyphenator, Set dictionary) {
+    this(input, hyphenator, dictionary, DEFAULT_MIN_WORD_SIZE,
+        DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE, false);
+  }
 
   /**
+   * Creates a new {@link HyphenationCompoundWordTokenFilter} instance.
+   * 
+   * @param matchVersion
+   *          Lucene version to enable correct Unicode 4.0 behavior in the
+   *          dictionaries if Version > 3.0. See <a
+   *          href="CompoundWordTokenFilterBase#version"
+   *          >CompoundWordTokenFilterBase</a> for details.
+   * @param input
+   *          the {@link TokenStream} to process
+   * @param hyphenator
+   *          the hyphenation pattern tree to use for hyphenation
+   * @param dictionary
+   *          the word dictionary to match against. If this is a
+   *          {@link org.apache.lucene.analysis.CharArraySet CharArraySet} it
+   *          must have set ignoreCase=false and only contain lower case
+   *          strings.
+   * @param minWordSize
+   *          only words longer than this get processed
+   * @param minSubwordSize
+   *          only subwords longer than this get to the output stream
+   * @param maxSubwordSize
+   *          only subwords shorter than this get to the output stream
+   * @param onlyLongestMatch
+   *          Add only the longest matching subword to the stream
+   */
+  public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input,
+      HyphenationTree hyphenator, Set dictionary, int minWordSize,
+      int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
+    super(matchVersion, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize,
+        onlyLongestMatch);
+
+    this.hyphenator = hyphenator;
+  }
+
+  /**
+   * Creates a new {@link HyphenationCompoundWordTokenFilter} instance.
    * 
    * @param input the {@link TokenStream} to process
    * @param hyphenator the hyphenation pattern tree to use for hyphenation
@@ -53,41 +165,47 @@
    * @param maxSubwordSize only subwords shorter than this get to the output
    *        stream
    * @param onlyLongestMatch Add only the longest matching subword to the stream
+   * @deprecated use {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[], int, int, int, boolean)} instead. 
    */
   public HyphenationCompoundWordTokenFilter(TokenStream input,
       HyphenationTree hyphenator, String[] dictionary, int minWordSize,
       int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
-    this(input, hyphenator, makeDictionary(dictionary), minWordSize,
+    this(Version.LUCENE_30, input, hyphenator, makeDictionary(dictionary), minWordSize,
         minSubwordSize, maxSubwordSize, onlyLongestMatch);
   }
 
   /**
-   * 
+   * Creates a new {@link HyphenationCompoundWordTokenFilter} instance.
+   *  
    * @param input the {@link TokenStream} to process
    * @param hyphenator the hyphenation pattern tree to use for hyphenation
    * @param dictionary the word dictionary to match against
+   * @deprecated use {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[])} instead.
    */
   public HyphenationCompoundWordTokenFilter(TokenStream input,
       HyphenationTree hyphenator, String[] dictionary) {
-    this(input, hyphenator, makeDictionary(dictionary), DEFAULT_MIN_WORD_SIZE,
+    this(Version.LUCENE_30, input, hyphenator, makeDictionary(dictionary), DEFAULT_MIN_WORD_SIZE,
         DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE, false);
   }
 
   /**
-   * 
+   * Creates a new {@link HyphenationCompoundWordTokenFilter} instance.
+   *  
    * @param input the {@link TokenStream} to process
    * @param hyphenator the hyphenation pattern tree to use for hyphenation
    * @param dictionary the word dictionary to match against. If this is a {@link org.apache.lucene.analysis.CharArraySet CharArraySet} it must have set ignoreCase=false and only contain
    *        lower case strings. 
+   * @deprecated use {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set)} instead.        
    */
   public HyphenationCompoundWordTokenFilter(TokenStream input,
       HyphenationTree hyphenator, Set dictionary) {
-    this(input, hyphenator, dictionary, DEFAULT_MIN_WORD_SIZE,
+    this(Version.LUCENE_30, input, hyphenator, dictionary, DEFAULT_MIN_WORD_SIZE,
         DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE, false);
   }
 
   /**
-   * 
+   * Creates a new {@link HyphenationCompoundWordTokenFilter} instance.
+   *  
    * @param input the {@link TokenStream} to process
    * @param hyphenator the hyphenation pattern tree to use for hyphenation
    * @param dictionary the word dictionary to match against. If this is a {@link org.apache.lucene.analysis.CharArraySet CharArraySet} it must have set ignoreCase=false and only contain
@@ -98,11 +216,12 @@
    * @param maxSubwordSize only subwords shorter than this get to the output
    *        stream
    * @param onlyLongestMatch Add only the longest matching subword to the stream
+   * @deprecated use {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set, int, int, int, boolean)} instead.
    */
   public HyphenationCompoundWordTokenFilter(TokenStream input,
       HyphenationTree hyphenator, Set dictionary, int minWordSize,
       int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {
-    super(input, dictionary, minWordSize, minSubwordSize, maxSubwordSize,
+    super(Version.LUCENE_30, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize,
         onlyLongestMatch);
 
     this.hyphenator = hyphenator;

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java Wed Dec  2 17:26:34 2009
@@ -26,7 +26,6 @@
 import org.apache.lucene.analysis.WordlistLoader;
 import org.apache.lucene.analysis.standard.StandardFilter;
 import org.apache.lucene.analysis.standard.StandardTokenizer;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;  // for javadoc
 import org.apache.lucene.util.Version;
 
 import java.io.*;
@@ -36,19 +35,27 @@
 import java.util.Collections;
 
 /**
- * {@link Analyzer} for Czech language. 
+ * {@link Analyzer} for Czech language.
  * <p>
- * Supports an external list of stopwords (words that
- * will not be indexed at all). 
- * A default set of stopwords is used unless an alternative list is specified.
+ * Supports an external list of stopwords (words that will not be indexed at
+ * all). A default set of stopwords is used unless an alternative list is
+ * specified.
  * </p>
- *
- * <p><b>NOTE</b>: This class uses the same {@link Version}
- * dependent settings as {@link StandardAnalyzer}.</p>
+ * 
+ * <a name="version"/>
+ * <p>
+ * You must specify the required {@link Version} compatibility when creating
+ * CzechAnalyzer:
+ * <ul>
+ * <li>As of 3.1, words are stemmed with {@link CzechStemFilter}
+ * <li>As of 2.9, StopFilter preserves position increments
+ * <li>As of 2.4, Tokens incorrectly identified as acronyms are corrected (see
+ * <a href="https://issues.apache.org/jira/browse/LUCENE-1068">LUCENE-1068</a>)
+ * </ul>
  */
 public final class CzechAnalyzer extends Analyzer {
 
-	/**
+  /**
 	 * List of typical stopwords.
 	 * @deprecated use {@link #getDefaultStopSet()} instead
 	 */
@@ -74,68 +81,82 @@
         "jeho\u017e","j\u00ed\u017e","jeliko\u017e","je\u017e","jako\u017e","na\u010de\u017e",
     };
 	
-	/**
-	 * Returns a set of default Czech-stopwords 
-	 * @return a set of default Czech-stopwords 
-	 */
+  /**
+   * Returns a set of default Czech-stopwords
+   * 
+   * @return a set of default Czech-stopwords
+   */
 	public static final Set<?> getDefaultStopSet(){
 	  return DefaultSetHolder.DEFAULT_SET;
 	}
 	
 	private static class DefaultSetHolder {
 	  private static final Set<?> DEFAULT_SET = CharArraySet.unmodifiableSet(new CharArraySet(
-	      Arrays.asList(CZECH_STOP_WORDS), false));
+	      Version.LUCENE_CURRENT, Arrays.asList(CZECH_STOP_WORDS), false));
 	}
 
-	/**
-	 * Contains the stopwords used with the {@link StopFilter}.
-	 */
+  /**
+   * Contains the stopwords used with the {@link StopFilter}.
+   */
 	// TODO make this final in 3.1
 	private Set<?> stoptable;
   private final Version matchVersion;
 
-	/**
-	 * Builds an analyzer with the default stop words ({@link #CZECH_STOP_WORDS}).
-	 */
+  /**
+   * Builds an analyzer with the default stop words ({@link #CZECH_STOP_WORDS}).
+   * 
+   * @param matchVersion Lucene version to match See
+   *          {@link <a href="#version">above</a>}
+   */
 	public CzechAnalyzer(Version matchVersion) {
     this(matchVersion, DefaultSetHolder.DEFAULT_SET);
 	}
 	
-	/**
-   * Builds an analyzer with the given stop words and stemming exclusion words
+  /**
+   * Builds an analyzer with the given stop words.
    * 
-   * @param matchVersion
-   *          lucene compatibility version
-   * @param stopwords
-   *          a stopword set
+   * @param matchVersion Lucene version to match See
+   *          {@link <a href="#version">above</a>}
+   * @param stopwords a stopword set
    */
   public CzechAnalyzer(Version matchVersion, Set<?> stopwords) {
     this.matchVersion = matchVersion;
-    this.stoptable = CharArraySet.unmodifiableSet(CharArraySet.copy(stopwords));
+    this.stoptable = CharArraySet.unmodifiableSet(CharArraySet.copy(matchVersion, stopwords));
   }
 
 
-	/**
-	 * Builds an analyzer with the given stop words.
-	 * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
-	 */
+  /**
+   * Builds an analyzer with the given stop words.
+   * 
+   * @param matchVersion Lucene version to match See
+   *          {@link <a href="#version">above</a>}
+   * @param stopwords a stopword set
+   * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
+   */
   public CzechAnalyzer(Version matchVersion, String... stopwords) {
-    this(matchVersion, StopFilter.makeStopSet( stopwords ));
+    this(matchVersion, StopFilter.makeStopSet( matchVersion, stopwords ));
 	}
 
   /**
    * Builds an analyzer with the given stop words.
    * 
+   * @param matchVersion Lucene version to match See
+   *          {@link <a href="#version">above</a>}
+   * @param stopwords a stopword set
    * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
    */
   public CzechAnalyzer(Version matchVersion, HashSet<?> stopwords) {
     this(matchVersion, (Set<?>)stopwords);
 	}
 
-	/**
-	 * Builds an analyzer with the given stop words.
-	 * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
-	 */
+  /**
+   * Builds an analyzer with the given stop words.
+   * 
+   * @param matchVersion Lucene version to match See
+   *          {@link <a href="#version">above</a>}
+   * @param stopwords a file containing stopwords
+   * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
+   */
   public CzechAnalyzer(Version matchVersion, File stopwords ) throws IOException {
     this(matchVersion, (Set<?>)WordlistLoader.getWordSet( stopwords ));
 	}
@@ -171,19 +192,23 @@
         }
     }
 
-	/**
-	 * Creates a {@link TokenStream} which tokenizes all the text in the provided {@link Reader}.
-	 *
-	 * @return  A {@link TokenStream} built from a {@link StandardTokenizer} filtered with
-	 * 			{@link StandardFilter}, {@link LowerCaseFilter}, and {@link StopFilter}
-	 */
-	@Override
+  /**
+   * Creates a {@link TokenStream} which tokenizes all the text in the provided
+   * {@link Reader}.
+   * 
+   * @return A {@link TokenStream} built from a {@link StandardTokenizer}
+   *         filtered with {@link StandardFilter}, {@link LowerCaseFilter},
+   *         {@link StopFilter}, and {@link CzechStemFilter} (only if version is
+   *         >= LUCENE_31)
+   */
+  @Override
 	public final TokenStream tokenStream( String fieldName, Reader reader ) {
                 TokenStream result = new StandardTokenizer( matchVersion, reader );
 		result = new StandardFilter( result );
-		result = new LowerCaseFilter( result );
-		result = new StopFilter( StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                                         result, stoptable );
+		result = new LowerCaseFilter( matchVersion, result );
+		result = new StopFilter( matchVersion, result, stoptable );
+		if (matchVersion.onOrAfter(Version.LUCENE_31))
+		  result = new CzechStemFilter(result);
 		return result;
 	}
 	
@@ -192,13 +217,15 @@
 	    TokenStream result;
 	};
 	
-	/**
-     * Returns a (possibly reused) {@link TokenStream} which tokenizes all the text in 
-     * the provided {@link Reader}.
-     *
-     * @return  A {@link TokenStream} built from a {@link StandardTokenizer} filtered with
-     *          {@link StandardFilter}, {@link LowerCaseFilter}, and {@link StopFilter}
-     */
+  /**
+   * Returns a (possibly reused) {@link TokenStream} which tokenizes all the
+   * text in the provided {@link Reader}.
+   * 
+   * @return A {@link TokenStream} built from a {@link StandardTokenizer}
+   *         filtered with {@link StandardFilter}, {@link LowerCaseFilter},
+   *         {@link StopFilter}, and {@link CzechStemFilter} (only if version is
+   *         >= LUCENE_31)
+   */
 	@Override
 	public TokenStream reusableTokenStream(String fieldName, Reader reader)
       throws IOException {
@@ -207,9 +234,10 @@
         streams = new SavedStreams();
         streams.source = new StandardTokenizer(matchVersion, reader);
         streams.result = new StandardFilter(streams.source);
-        streams.result = new LowerCaseFilter(streams.result);
-        streams.result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                                        streams.result, stoptable);
+        streams.result = new LowerCaseFilter(matchVersion, streams.result);
+        streams.result = new StopFilter( matchVersion, streams.result, stoptable);
+        if (matchVersion.onOrAfter(Version.LUCENE_31))
+          streams.result = new CzechStemFilter(streams.result);
         setPreviousTokenStream(streams);
       } else {
         streams.source.reset(reader);

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java Wed Dec  2 17:26:34 2009
@@ -83,7 +83,7 @@
   
   private static class DefaultSetHolder {
     private static final Set<?> DEFAULT_SET = CharArraySet.unmodifiableSet(new CharArraySet(
-        Arrays.asList(GERMAN_STOP_WORDS), false));
+        Version.LUCENE_CURRENT, Arrays.asList(GERMAN_STOP_WORDS), false));
   }
 
   /**
@@ -131,8 +131,8 @@
    *          a stemming exclusion set
    */
   public GermanAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet) {
-    stopSet = CharArraySet.unmodifiableSet(CharArraySet.copy(stopwords));
-    exclusionSet = CharArraySet.unmodifiableSet(CharArraySet.copy(stemExclusionSet));
+    stopSet = CharArraySet.unmodifiableSet(CharArraySet.copy(matchVersion, stopwords));
+    exclusionSet = CharArraySet.unmodifiableSet(CharArraySet.copy(matchVersion, stemExclusionSet));
     setOverridesTokenStreamMethod(GermanAnalyzer.class);
     this.matchVersion = matchVersion;
   }
@@ -142,7 +142,7 @@
    * @deprecated use {@link #GermanAnalyzer(Version, Set)}
    */
   public GermanAnalyzer(Version matchVersion, String... stopwords) {
-    this(matchVersion, StopFilter.makeStopSet(stopwords));
+    this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));
   }
 
   /**
@@ -167,7 +167,7 @@
    * @deprecated use {@link #GermanAnalyzer(Version, Set, Set)} instead
    */
   public void setStemExclusionTable(String[] exclusionlist) {
-    exclusionSet = StopFilter.makeStopSet(exclusionlist);
+    exclusionSet = StopFilter.makeStopSet(matchVersion, exclusionlist);
     setPreviousTokenStream(null); // force a new stemmer to be created
   }
 
@@ -175,8 +175,8 @@
    * Builds an exclusionlist from a {@link Map}
    * @deprecated use {@link #GermanAnalyzer(Version, Set, Set)} instead
    */
-  public void setStemExclusionTable(Map exclusionlist) {
-    exclusionSet = new HashSet(exclusionlist.keySet());
+  public void setStemExclusionTable(Map<?,?> exclusionlist) {
+    exclusionSet = new HashSet<Object>(exclusionlist.keySet());
     setPreviousTokenStream(null); // force a new stemmer to be created
   }
 
@@ -200,9 +200,8 @@
   public TokenStream tokenStream(String fieldName, Reader reader) {
     TokenStream result = new StandardTokenizer(matchVersion, reader);
     result = new StandardFilter(result);
-    result = new LowerCaseFilter(result);
-    result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                            result, stopSet);
+    result = new LowerCaseFilter(matchVersion, result);
+    result = new StopFilter( matchVersion, result, stopSet);
     result = new GermanStemFilter(result, exclusionSet);
     return result;
   }
@@ -234,9 +233,8 @@
       streams = new SavedStreams();
       streams.source = new StandardTokenizer(matchVersion, reader);
       streams.result = new StandardFilter(streams.source);
-      streams.result = new LowerCaseFilter(streams.result);
-      streams.result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                                      streams.result, stopSet);
+      streams.result = new LowerCaseFilter(matchVersion, streams.result);
+      streams.result = new StopFilter( matchVersion, streams.result, stopSet);
       streams.result = new GermanStemFilter(streams.result, exclusionSet);
       setPreviousTokenStream(streams);
     } else {

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java Wed Dec  2 17:26:34 2009
@@ -70,7 +70,7 @@
     
     private static class DefaultSetHolder {
       private static final Set<?> DEFAULT_SET = CharArraySet.unmodifiableSet(new CharArraySet(
-          Arrays.asList(GREEK_STOP_WORDS), false));
+          Version.LUCENE_CURRENT, Arrays.asList(GREEK_STOP_WORDS), false));
     }
 
     /**
@@ -93,7 +93,7 @@
      *          a stopword set
      */
     public GreekAnalyzer(Version matchVersion, Set<?> stopwords) {
-      stopSet = CharArraySet.unmodifiableSet(CharArraySet.copy(stopwords));
+      stopSet = CharArraySet.unmodifiableSet(CharArraySet.copy(matchVersion, stopwords));
       this.matchVersion = matchVersion;
     }
 
@@ -104,7 +104,7 @@
      */
     public GreekAnalyzer(Version matchVersion, String... stopwords)
     {
-      this(matchVersion, StopFilter.makeStopSet(stopwords));
+      this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));
     }
 
     /**
@@ -127,8 +127,7 @@
     {
         TokenStream result = new StandardTokenizer(matchVersion, reader);
         result = new GreekLowerCaseFilter(result);
-        result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                                result, stopSet);
+        result = new StopFilter(matchVersion, result, stopSet);
         return result;
     }
     
@@ -152,8 +151,7 @@
         streams = new SavedStreams();
         streams.source = new StandardTokenizer(matchVersion, reader);
         streams.result = new GreekLowerCaseFilter(streams.source);
-        streams.result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                                        streams.result, stopSet);
+        streams.result = new StopFilter(matchVersion, streams.result, stopSet);
         setPreviousTokenStream(streams);
       } else {
         streams.source.reset(reader);

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java?rev=886210&r1=886209&r2=886210&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java Wed Dec  2 17:26:34 2009
@@ -126,7 +126,7 @@
    *          a stopword set
    */
   public PersianAnalyzer(Version matchVersion, Set<?> stopwords){
-    stoptable = CharArraySet.unmodifiableSet(CharArraySet.copy(stopwords));
+    stoptable = CharArraySet.unmodifiableSet(CharArraySet.copy(matchVersion, stopwords));
     this.matchVersion = matchVersion;
   }
 
@@ -135,7 +135,7 @@
    * @deprecated use {@link #PersianAnalyzer(Version, Set)} instead
    */
   public PersianAnalyzer(Version matchVersion, String... stopwords) {
-    this(matchVersion, StopFilter.makeStopSet(stopwords));
+    this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));
   }
 
   /**
@@ -167,7 +167,7 @@
   @Override
   public TokenStream tokenStream(String fieldName, Reader reader) {
     TokenStream result = new ArabicLetterTokenizer(reader);
-    result = new LowerCaseFilter(result);
+    result = new LowerCaseFilter(matchVersion, result);
     result = new ArabicNormalizationFilter(result);
     /* additional persian-specific normalization */
     result = new PersianNormalizationFilter(result);
@@ -175,8 +175,7 @@
      * the order here is important: the stopword list is normalized with the
      * above!
      */
-    result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                            result, stoptable);
+    result = new StopFilter(matchVersion, result, stoptable);
     return result;
   }
   
@@ -201,7 +200,7 @@
     if (streams == null) {
       streams = new SavedStreams();
       streams.source = new ArabicLetterTokenizer(reader);
-      streams.result = new LowerCaseFilter(streams.source);
+      streams.result = new LowerCaseFilter(matchVersion, streams.source);
       streams.result = new ArabicNormalizationFilter(streams.result);
       /* additional persian-specific normalization */
       streams.result = new PersianNormalizationFilter(streams.result);
@@ -209,8 +208,7 @@
        * the order here is important: the stopword list is normalized with the
        * above!
        */
-      streams.result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
-                                      streams.result, stoptable);
+      streams.result = new StopFilter(matchVersion, streams.result, stoptable);
       setPreviousTokenStream(streams);
     } else {
       streams.source.reset(reader);



Mime
View raw message