You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by cc...@apache.org on 2011/11/21 20:45:08 UTC

[Lucene.Net] svn commit: r1204666 - in /incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk: src/contrib/Analyzers/CJK/ src/contrib/Analyzers/Cz/ src/core/ src/core/Index/ src/core/Search/ src/core/Util/ test/core/Index/

Author: ccurrens
Date: Mon Nov 21 19:45:07 2011
New Revision: 1204666

URL: http://svn.apache.org/viewvc?rev=1204666&view=rev
Log:
Changed MultipleTermPositions to use LinkedList
updated change notes/moved certain TODOs

Modified:
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/contrib/Analyzers/CJK/CJKTokenizer.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/contrib/Analyzers/Cz/CzechAnalyzer.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/ChangeNotes.txt
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/BufferedDeletes.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ConcurrentMergeScheduler.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/MultipleTermPositions.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FuzzyQuery.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/ParallelMultiSearcher.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/TopDocsCollector.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Util/AttributeSource.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Util/PriorityQueue.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestIndexWriter.cs

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/contrib/Analyzers/CJK/CJKTokenizer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/contrib/Analyzers/CJK/CJKTokenizer.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/contrib/Analyzers/CJK/CJKTokenizer.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/contrib/Analyzers/CJK/CJKTokenizer.cs Mon Nov 21 19:45:07 2011
@@ -282,7 +282,7 @@ namespace Lucene.Net.Analysis.CJK
                             }
 
                             // store the LowerCase(c) in the buffer
-                            buffer[length++] = char.ToLower(c); // TODO: is java invariant?  If not, this should be ToLower()
+                            buffer[length++] = char.ToLower(c); // TODO: is java invariant?  If so, this should be ToLowerInvariant()
                             tokenType = SINGLE_TOKEN_TYPE;
 
                             // break the procedure if buffer overflowed!

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/contrib/Analyzers/Cz/CzechAnalyzer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/contrib/Analyzers/Cz/CzechAnalyzer.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/contrib/Analyzers/Cz/CzechAnalyzer.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/contrib/Analyzers/Cz/CzechAnalyzer.cs Mon Nov 21 19:45:07 2011
@@ -1,18 +1,18 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 using System;
@@ -27,196 +27,196 @@ using Lucene.Net.Analysis.Standard;
 using Version = Lucene.Net.Util.Version;
 
 namespace Lucene.Net.Analysis.Cz
-{
-/**
- * {@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.
- * </p>
- *
- * <p><b>NOTE</b>: This class uses the same {@link Version}
- * dependent settings as {@link StandardAnalyzer}.</p>
- */
-public sealed class CzechAnalyzer : Analyzer {
-
-	/**
-	 * List of typical stopwords.
-	 * @deprecated use {@link #getDefaultStopSet()} instead
-	 */
-  // TODO make this private in 3.1
-	public static readonly String[] CZECH_STOP_WORDS = {
-        "a","s","k","o","i","u","v","z","dnes","cz","t\u00edmto","bude\u0161","budem",
-        "byli","jse\u0161","m\u016fj","sv\u00fdm","ta","tomto","tohle","tuto","tyto",
-        "jej","zda","pro\u010d","m\u00e1te","tato","kam","tohoto","kdo","kte\u0159\u00ed",
-        "mi","n\u00e1m","tom","tomuto","m\u00edt","nic","proto","kterou","byla",
-        "toho","proto\u017ee","asi","ho","na\u0161i","napi\u0161te","re","co\u017e","t\u00edm",
-        "tak\u017ee","sv\u00fdch","jej\u00ed","sv\u00fdmi","jste","aj","tu","tedy","teto",
-        "bylo","kde","ke","prav\u00e9","ji","nad","nejsou","\u010di","pod","t\u00e9ma",
-        "mezi","p\u0159es","ty","pak","v\u00e1m","ani","kdy\u017e","v\u0161ak","neg","jsem",
-        "tento","\u010dl\u00e1nku","\u010dl\u00e1nky","aby","jsme","p\u0159ed","pta","jejich",
-        "byl","je\u0161t\u011b","a\u017e","bez","tak\u00e9","pouze","prvn\u00ed","va\u0161e","kter\u00e1",
-        "n\u00e1s","nov\u00fd","tipy","pokud","m\u016f\u017ee","strana","jeho","sv\u00e9","jin\u00e9",
-        "zpr\u00e1vy","nov\u00e9","nen\u00ed","v\u00e1s","jen","podle","zde","u\u017e","b\u00fdt","v\u00edce",
-        "bude","ji\u017e","ne\u017e","kter\u00fd","by","kter\u00e9","co","nebo","ten","tak",
-        "m\u00e1","p\u0159i","od","po","jsou","jak","dal\u0161\u00ed","ale","si","se","ve",
-        "to","jako","za","zp\u011bt","ze","do","pro","je","na","atd","atp",
-        "jakmile","p\u0159i\u010dem\u017e","j\u00e1","on","ona","ono","oni","ony","my","vy",
-        "j\u00ed","ji","m\u011b","mne","jemu","tomu","t\u011bm","t\u011bmu","n\u011bmu","n\u011bmu\u017e",
-        "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 
-	 */
-	public static ISet<string> getDefaultStopSet(){
-	  return DefaultSetHolder.DEFAULT_SET;
-	}
-	
-	private static class DefaultSetHolder {
-	  internal static ISet<string> DEFAULT_SET = CharArraySet.UnmodifiableSet(new CharArraySet(
-	      CZECH_STOP_WORDS, false));
-	}
-
-	/**
-	 * Contains the stopwords used with the {@link StopFilter}.
-	 */
-	// TODO make this final in 3.1
-	private ISet<string> stoptable;
-  private readonly Version matchVersion;
-
-	/**
-	 * Builds an analyzer with the default stop words ({@link #CZECH_STOP_WORDS}).
-	 */
-	public CzechAnalyzer(Version matchVersion) 
-    : this(matchVersion, DefaultSetHolder.DEFAULT_SET)
-    {
-    
-	}
-	
-	/**
-   * Builds an analyzer with the given stop words and stemming exclusion words
-   * 
-   * @param matchVersion
-   *          lucene compatibility version
-   * @param stopwords
-   *          a stopword set
-   */
-  public CzechAnalyzer(Version matchVersion, ISet<string> stopwords) {
-    this.matchVersion = matchVersion;
-    this.stoptable = CharArraySet.UnmodifiableSet(CharArraySet.Copy(stopwords));
-  }
-
-
-	/**
-	 * Builds an analyzer with the given stop words.
-	 * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
-	 */
-  public CzechAnalyzer(Version matchVersion, params string[] stopwords) 
-  : this(matchVersion, StopFilter.MakeStopSet( stopwords ))
-  {
-    
-	}
-
-  /**
-   * Builds an analyzer with the given stop words.
-   * 
-   * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
-   */
-  public CzechAnalyzer(Version matchVersion, HashSet<string> stopwords) 
-  : this(matchVersion, (ISet<string>)stopwords)
-  {
-    
-	}
-
-	/**
-	 * Builds an analyzer with the given stop words.
-	 * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
-	 */
-  public CzechAnalyzer(Version matchVersion, FileInfo stopwords ) 
-      : this(matchVersion, WordlistLoader.GetWordSet( stopwords ))
-  {
-    
-	}
-
-    /**
-     * Loads stopwords hash from resource stream (file, database...).
-     * @param   wordfile    File containing the wordlist
-     * @param   encoding    Encoding used (win-1250, iso-8859-2, ...), null for default system encoding
-     * @deprecated use {@link WordlistLoader#getWordSet(Reader, String) }
-     *             and {@link #CzechAnalyzer(Version, Set)} instead
-     */
-    public void LoadStopWords( Stream wordfile, System.Text.Encoding encoding ) {
-        SetPreviousTokenStream(null); // force a new stopfilter to be created
+{
+/**
+ * {@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.
+ * </p>
+ *
+ * <p><b>NOTE</b>: This class uses the same {@link Version}
+ * dependent settings as {@link StandardAnalyzer}.</p>
+ */
+public sealed class CzechAnalyzer : Analyzer {
+
+	/**
+	 * List of typical stopwords.
+	 * @deprecated use {@link #getDefaultStopSet()} instead
+	 */
+  // TODO make this private in 3.1
+	public static readonly String[] CZECH_STOP_WORDS = {
+        "a","s","k","o","i","u","v","z","dnes","cz","t\u00edmto","bude\u0161","budem",
+        "byli","jse\u0161","m\u016fj","sv\u00fdm","ta","tomto","tohle","tuto","tyto",
+        "jej","zda","pro\u010d","m\u00e1te","tato","kam","tohoto","kdo","kte\u0159\u00ed",
+        "mi","n\u00e1m","tom","tomuto","m\u00edt","nic","proto","kterou","byla",
+        "toho","proto\u017ee","asi","ho","na\u0161i","napi\u0161te","re","co\u017e","t\u00edm",
+        "tak\u017ee","sv\u00fdch","jej\u00ed","sv\u00fdmi","jste","aj","tu","tedy","teto",
+        "bylo","kde","ke","prav\u00e9","ji","nad","nejsou","\u010di","pod","t\u00e9ma",
+        "mezi","p\u0159es","ty","pak","v\u00e1m","ani","kdy\u017e","v\u0161ak","neg","jsem",
+        "tento","\u010dl\u00e1nku","\u010dl\u00e1nky","aby","jsme","p\u0159ed","pta","jejich",
+        "byl","je\u0161t\u011b","a\u017e","bez","tak\u00e9","pouze","prvn\u00ed","va\u0161e","kter\u00e1",
+        "n\u00e1s","nov\u00fd","tipy","pokud","m\u016f\u017ee","strana","jeho","sv\u00e9","jin\u00e9",
+        "zpr\u00e1vy","nov\u00e9","nen\u00ed","v\u00e1s","jen","podle","zde","u\u017e","b\u00fdt","v\u00edce",
+        "bude","ji\u017e","ne\u017e","kter\u00fd","by","kter\u00e9","co","nebo","ten","tak",
+        "m\u00e1","p\u0159i","od","po","jsou","jak","dal\u0161\u00ed","ale","si","se","ve",
+        "to","jako","za","zp\u011bt","ze","do","pro","je","na","atd","atp",
+        "jakmile","p\u0159i\u010dem\u017e","j\u00e1","on","ona","ono","oni","ony","my","vy",
+        "j\u00ed","ji","m\u011b","mne","jemu","tomu","t\u011bm","t\u011bmu","n\u011bmu","n\u011bmu\u017e",
+        "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 
+	 */
+	public static ISet<string> getDefaultStopSet(){
+	  return DefaultSetHolder.DEFAULT_SET;
+	}
+	
+	private static class DefaultSetHolder {
+	  internal static ISet<string> DEFAULT_SET = CharArraySet.UnmodifiableSet(new CharArraySet(
+	      CZECH_STOP_WORDS, false));
+	}
+
+	/**
+	 * Contains the stopwords used with the {@link StopFilter}.
+	 */
+	// TODO make this final in 3.1
+	private ISet<string> stoptable;
+  private readonly Version matchVersion;
+
+	/**
+	 * Builds an analyzer with the default stop words ({@link #CZECH_STOP_WORDS}).
+	 */
+	public CzechAnalyzer(Version matchVersion) 
+    : this(matchVersion, DefaultSetHolder.DEFAULT_SET)
+    {
+    
+	}
+	
+	/**
+   * Builds an analyzer with the given stop words and stemming exclusion words
+   * 
+   * @param matchVersion
+   *          lucene compatibility version
+   * @param stopwords
+   *          a stopword set
+   */
+  public CzechAnalyzer(Version matchVersion, ISet<string> stopwords) {
+    this.matchVersion = matchVersion;
+    this.stoptable = CharArraySet.UnmodifiableSet(CharArraySet.Copy(stopwords));
+  }
+
+
+	/**
+	 * Builds an analyzer with the given stop words.
+	 * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
+	 */
+  public CzechAnalyzer(Version matchVersion, params string[] stopwords) 
+  : this(matchVersion, StopFilter.MakeStopSet( stopwords ))
+  {
+    
+	}
+
+  /**
+   * Builds an analyzer with the given stop words.
+   * 
+   * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
+   */
+  public CzechAnalyzer(Version matchVersion, HashSet<string> stopwords) 
+  : this(matchVersion, (ISet<string>)stopwords)
+  {
+    
+	}
+
+	/**
+	 * Builds an analyzer with the given stop words.
+	 * @deprecated use {@link #CzechAnalyzer(Version, Set)} instead
+	 */
+  public CzechAnalyzer(Version matchVersion, FileInfo stopwords ) 
+      : this(matchVersion, WordlistLoader.GetWordSet( stopwords ))
+  {
+    
+	}
+
+    /**
+     * Loads stopwords hash from resource stream (file, database...).
+     * @param   wordfile    File containing the wordlist
+     * @param   encoding    Encoding used (win-1250, iso-8859-2, ...), null for default system encoding
+     * @deprecated use {@link WordlistLoader#getWordSet(Reader, String) }
+     *             and {@link #CzechAnalyzer(Version, Set)} instead
+     */
+    public void LoadStopWords( Stream wordfile, System.Text.Encoding encoding ) {
+        SetPreviousTokenStream(null); // force a new stopfilter to be created
         if ( wordfile == null )
         {
-            stoptable = new HashSet<string>();
-            return;
-        }
-        try {
-            // clear any previous table (if present)
-            stoptable = new HashSet<string>();
-
-            StreamReader isr;
-            if (encoding == null)
-                isr = new StreamReader(wordfile);
-            else
-                isr = new StreamReader(wordfile, encoding);
-
-            stoptable = WordlistLoader.GetWordSet(isr);
-        } catch ( IOException e ) {
-          // clear any previous table (if present)
-          // TODO: throw IOException
-          stoptable = new HashSet<string>();
-        }
-    }
-
-	/**
-	 * 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}
-	 */
-	public override sealed TokenStream TokenStream( String fieldName, TextReader reader ) {
-                TokenStream result = new StandardTokenizer( matchVersion, reader );
-		result = new StandardFilter( result );
-		result = new LowerCaseFilter( result );
-		result = new StopFilter( StopFilter.GetEnablePositionIncrementsVersionDefault(matchVersion),
-                                         result, stoptable );
-		return result;
-	}
-	
-	private class SavedStreams {
-	    protected internal Tokenizer source;
-	    protected internal 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}
-     */
-	public override TokenStream ReusableTokenStream(String fieldName, TextReader reader)
-    {
-      SavedStreams streams = (SavedStreams) GetPreviousTokenStream();
-      if (streams == null) {
-        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);
-        SetPreviousTokenStream(streams);
-      } else {
-        streams.source.Reset(reader);
-      }
-      return streams.result;
-    }
-}
-
+            stoptable = new HashSet<string>();
+            return;
+        }
+        try {
+            // clear any previous table (if present)
+            stoptable = new HashSet<string>();
+
+            StreamReader isr;
+            if (encoding == null)
+                isr = new StreamReader(wordfile);
+            else
+                isr = new StreamReader(wordfile, encoding);
+
+            stoptable = WordlistLoader.GetWordSet(isr);
+        } catch ( IOException e ) {
+          // clear any previous table (if present)
+          // TODO: throw IOException
+          stoptable = new HashSet<string>();
+        }
+    }
+
+	/**
+	 * 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}
+	 */
+	public override sealed TokenStream TokenStream( String fieldName, TextReader reader ) {
+                TokenStream result = new StandardTokenizer( matchVersion, reader );
+		result = new StandardFilter( result );
+		result = new LowerCaseFilter( result );
+		result = new StopFilter( StopFilter.GetEnablePositionIncrementsVersionDefault(matchVersion),
+                                         result, stoptable );
+		return result;
+	}
+	
+	private class SavedStreams {
+	    protected internal Tokenizer source;
+	    protected internal 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}
+     */
+	public override TokenStream ReusableTokenStream(String fieldName, TextReader reader)
+    {
+      SavedStreams streams = (SavedStreams) GetPreviousTokenStream();
+      if (streams == null) {
+        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);
+        SetPreviousTokenStream(streams);
+      } else {
+        streams.source.Reset(reader);
+      }
+      return streams.result;
+    }
+}
+
 
 }

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/ChangeNotes.txt
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/ChangeNotes.txt?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/ChangeNotes.txt (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/ChangeNotes.txt Mon Nov 21 19:45:07 2011
@@ -64,6 +64,17 @@ Constants.cs - LUCENE_MAIN_VERSION, and 
 ParallelMultiSearcher -> Successfully ported, but in Java the threads are named, in .NET, I ported it without named threads 
                          (also without NamedThreadFactory from java's util)
 
+FieldSelectorResult -> uses kludgy workaround due to Enums not being able to be null.  It's only used in the MapFieldSelector class, when
+                       deciding to include a field or not.
+
+ConcurrentMergeScheduler/IndexWriter -> Tries to assert the current thread holds a lock.  This isn't possible in .NET
+
+SegmentInfos.cs -> 3 places need to return a readonly HashMap.
+
+
+There are a good amount of methods that have been changed from protected internal to public, seemingly for use with NUnit.  I've added Lucene.Net.Test
+as a friend assembly that can access internals.  We can change these accessibility modifiers back to how they are in java, and still have it be testable.
+We can also get rid of the properties and such that are "fields_forNUnit" or like it.  It just doesn't look good.
 
 TODO: NamedThreadFactory.java - Is this needed?  What is it for, just for debugging?
 TODO: DummyConcurrentLock.java - Not Needed?

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/BufferedDeletes.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/BufferedDeletes.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/BufferedDeletes.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/BufferedDeletes.cs Mon Nov 21 19:45:07 2011
@@ -45,7 +45,7 @@ namespace Lucene.Net.Index
             this.doTermSort = doTermSort;
             if (doTermSort)
             {
-                //TODO: This isn't quite the same as a TreeMap
+                //TODO: Used in place of TreeMap
                 terms = new SortedDictionary<Term, Num>();
             }
             else

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ConcurrentMergeScheduler.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ConcurrentMergeScheduler.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ConcurrentMergeScheduler.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ConcurrentMergeScheduler.cs Mon Nov 21 19:45:07 2011
@@ -192,7 +192,7 @@ namespace Lucene.Net.Index
 		
 		public override void  Merge(IndexWriter writer)
 		{
-			// TODO: .NET doesn't support this - Look into it
+			// TODO: .NET doesn't support this
 			// assert !Thread.holdsLock(writer);
 			
 			this.writer = writer;

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/MultipleTermPositions.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/MultipleTermPositions.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/MultipleTermPositions.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/MultipleTermPositions.cs Mon Nov 21 19:45:07 2011
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Collections.Generic;
 using Lucene.Net.Util;
 
 namespace Lucene.Net.Index
@@ -29,7 +30,7 @@ namespace Lucene.Net.Index
 	{
 		private sealed class TermPositionsQueue : PriorityQueue<TermPositions>
 		{
-			internal TermPositionsQueue(System.Collections.Generic.IList<TermPositions> termPositions)
+			internal TermPositionsQueue(LinkedList<TermPositions> termPositions)
 			{
 				Initialize(termPositions.Count);
 				
@@ -114,13 +115,10 @@ namespace Lucene.Net.Index
 		/// </exception>
 		public MultipleTermPositions(IndexReader indexReader, Term[] terms)
 		{
-            // TODO: Java implementation uses a LinkedList, which has different performance costs
-            //       for methods, particularly inserts.  If inserts are done, it may be beneficial
-            //       from a performance point of view to implement Java's version of LinkedList<T>
-			var termPositions = new System.Collections.Generic.List<TermPositions>();
+			var termPositions = new System.Collections.Generic.LinkedList<TermPositions>();
 			
 			for (int i = 0; i < terms.Length; i++)
-				termPositions.Add(indexReader.TermPositions(terms[i]));
+				termPositions.AddLast(indexReader.TermPositions(terms[i]));
 			
 			_termPositionsQueue = new TermPositionsQueue(termPositions);
 			_posList = new IntQueue();

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FuzzyQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FuzzyQuery.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FuzzyQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FuzzyQuery.cs Mon Nov 21 19:45:07 2011
@@ -116,7 +116,6 @@ namespace Lucene.Net.Search
 			return prefixLength;
 		}
 		
-        // TODO: Why is this public?  Java has this protected (C# protected internal is closer to it than public)
 		public /*protected internal*/ override FilteredTermEnum GetEnum(IndexReader reader)
 		{
 			return new FuzzyTermEnum(reader, GetTerm(), minimumSimilarity, prefixLength);

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/ParallelMultiSearcher.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/ParallelMultiSearcher.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/ParallelMultiSearcher.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/ParallelMultiSearcher.cs Mon Nov 21 19:45:07 2011
@@ -23,7 +23,6 @@ using Lucene.Net.Util;
 using IndexReader = Lucene.Net.Index.IndexReader;
 using Term = Lucene.Net.Index.Term;
 
-//TODO: This is an experimental change to ParallelMultiSearcher, attempting to use the TPL
 namespace Lucene.Net.Search
 {
 	/// <summary>Implements parallel search over a set of <c>Searchables</c>.

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/TopDocsCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/TopDocsCollector.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/TopDocsCollector.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/TopDocsCollector.cs Mon Nov 21 19:45:07 2011
@@ -27,9 +27,6 @@ namespace Lucene.Net.Search
 	/// Extending classes can override <see cref="TopDocs(int, int)" /> and
 	/// <see cref="GetTotalHits()" /> in order to provide their own implementation.
 	/// </summary>
-	// TODO: I don't like this.  Java's type inference allows this class to be defined without the type params wherever its used
-    //       we may be able to get the same functionality via generic variance, but an interface would have to be made for PriorityQueue<T>,
-    //       which is equally stupid.
 	public abstract class TopDocsCollector<T> : Collector where T : ScoreDoc
 	{
 		

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Util/AttributeSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Util/AttributeSource.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Util/AttributeSource.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Util/AttributeSource.cs Mon Nov 21 19:45:07 2011
@@ -37,7 +37,6 @@ namespace Lucene.Net.Util
 		public abstract class AttributeFactory
 		{
 			/// <summary> returns an <see cref="AttributeImpl" /> for the supplied <see cref="Attribute" /> interface class.</summary>
-			//TODO: .NET has no Type<T>, so this can't be a compiler time check like in java
 			public abstract AttributeImpl CreateAttributeInstance<T>() where T : Attribute;
 			
 			/// <summary> This is the default factory that creates <see cref="AttributeImpl" />s using the

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Util/PriorityQueue.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Util/PriorityQueue.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Util/PriorityQueue.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Util/PriorityQueue.cs Mon Nov 21 19:45:07 2011
@@ -31,7 +31,8 @@ namespace Lucene.Net.Util
 	/// </summary>
 	// TODO: T needs to be able to return null.  Behavior might be unexpected otherwise, since it returns default(T)
     //       I only see a non-nullable type used in PriorityQueue in the tests.  may be possible to re-write tests to
-    //       use an IComparable class, and this can be changed back to constraining on class, to return null
+    //       use an IComparable class, and this can be changed back to constraining on class, to return null, or should
+    //       we leave as is?
 	public abstract class PriorityQueue<T> //where T : class
 	{
 		private int size;

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestIndexWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestIndexWriter.cs?rev=1204666&r1=1204665&r2=1204666&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestIndexWriter.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestIndexWriter.cs Mon Nov 21 19:45:07 2011
@@ -5401,8 +5401,8 @@ namespace Lucene.Net.Index
                         if (false)// && interrupted())
                         {
                             Console.Out.WriteLine("FAILED; InterruptedException hit but thread.interrupted() was true");
-                            Console.Out.WriteLine(re.StackTrace);
-                            failed = true;
+                            Console.Out.WriteLine(re.StackTrace);
+                            failed = true;
                             break;
                         }
                     }