lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r479855 - in /incubator/lucene.net/tags/Lucene.Net_1_9_1/src: ./ Lucene.Net/ Lucene.Net/Index/ Lucene.Net/Search/
Date Tue, 28 Nov 2006 02:35:01 GMT
Author: aroush
Date: Mon Nov 27 18:35:00 2006
New Revision: 479855

URL: http://svn.apache.org/viewvc?view=rev&rev=479855
Log:
Release of Lucene.Net.1.9.1 build 004 "final"

Modified:
    incubator/lucene.net/tags/Lucene.Net_1_9_1/src/HISTORY.txt
    incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/AssemblyInfo.cs
    incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/FieldInfos.cs
    incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Lucene.Net.xml
    incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldCache.cs
    incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldCacheImpl.cs
    incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldSortedHitQueue.cs
    incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/IndexSearcher.cs

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_1/src/HISTORY.txt
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_1/src/HISTORY.txt?view=diff&rev=479855&r1=479854&r2=479855
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_1/src/HISTORY.txt (original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_1/src/HISTORY.txt Mon Nov 27 18:35:00 2006
@@ -2,6 +2,15 @@
 ------------------
 
 
+27Nov06:
+	- Release:  Lucene.Net.1.9.1 build 004 "final"
+	- Lucene.Net.Index.FieldInfos.FieldName()/FieldInfo() -- avoid the use of exception throwing
+	- Lucene.Net.Search.StringIndex.cs -- added a Close() method (to fix sort memory leak defect)
+	- Lucene.Net.Search.FieldCacheImpl.cs -- added a Close() method (to fix sort memory leak
defect)
+	- Lucene.Net.Search.FieldSortHitQueue.cs -- added a Close() method (to fix sort memory leak
defect)
+	- Lucene.Net.Search.IndexSearcher.cs -- added a Close() method (to fix sort memory leak
defect)
+
+
 11Oct06:
 	- Release:  Lucene.Net.1.9.1 build 003 "final"
 	- Fix: Lucene.Net.Index.TermBuffer.CompareTo() -- don't cast to System.Object
@@ -21,7 +30,7 @@
 	- Fix: Lucene.Net.Index.SegmentReader.cs and Lucene.Net.Index.TermInfosReader.cs -- fixed
memory leak by removing unused finalizer.
 	- Fix: Lucene.Net.Index.Compression.SharpZipLibAdapter -- provide full name-space to ICompressionAdapter
 	- Fix: Lucene.Net.Store.FSDirectory.RenameFile() -- added a missing while loop
-	- Fix: Lucene.Net.Store.MultiSearcher.CreateWeight() -- wasn't iterating over the term keys
correctly
+	- Fix: Lucene.Net.Search.MultiSearcher.CreateWeight() -- wasn't iterating over the term
keys correctly
 	- Fix: Lucene.Net.Search.Query.Combine() -- wasn't checking for the right key before adding
 
 

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/AssemblyInfo.cs?view=diff&rev=479855&r1=479854&r2=479855
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/AssemblyInfo.cs (original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/AssemblyInfo.cs Mon Nov 27 18:35:00
2006
@@ -26,7 +26,7 @@
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
 
-[assembly: AssemblyVersion("1.9.1.003")]
+[assembly: AssemblyVersion("1.9.1.004")]
 
 //
 // In order to sign your assembly you must specify a key to use. Refer to the 

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/FieldInfos.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/FieldInfos.cs?view=diff&rev=479855&r1=479854&r2=479855
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/FieldInfos.cs (original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/FieldInfos.cs Mon Nov
27 18:35:00 2006
@@ -255,6 +255,12 @@
 		/// </returns>
 		public System.String FieldName(int fieldNumber)
 		{
+            FieldInfo fi = FieldInfo(fieldNumber);
+            if (fi != null)
+                return fi.name;
+            return "";
+
+            /*
 			try
 			{
 				return FieldInfo(fieldNumber).name;
@@ -263,6 +269,7 @@
 			{
 				return "";
 			}
+            */
 		}
 		
 		/// <summary> Return the fieldinfo object referenced by the fieldNumber.</summary>
@@ -273,7 +280,12 @@
 		/// </returns>
 		public FieldInfo FieldInfo(int fieldNumber)
 		{
-			try
+            if (fieldNumber > -1 && fieldNumber < byNumber.Count)
+                return (FieldInfo) byNumber[fieldNumber];
+            return null;
+
+            /*
+            try
 			{
 				return (FieldInfo) byNumber[fieldNumber];
 			}
@@ -281,6 +293,7 @@
 			{
 				return null;
 			}
+            */
 		}
 		
 		public int Size()

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Lucene.Net.xml
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Lucene.Net.xml?view=diff&rev=479855&r1=479854&r2=479855
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Lucene.Net.xml (original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Lucene.Net.xml Mon Nov 27 18:35:00
2006
@@ -940,6 +940,10 @@
         <member name="M:Lucene.Net.Documents.Document.#ctor">
             <summary>Constructs a new document with no fields. </summary>
         </member>
+        <member name="M:Lucene.Net.Documents.Document.GetFieldsCount">
+            <summary>Returns the number of fields in this document</summary>
+            Added as a helper for Lucene.Net
+        </member>
         <!-- Badly formed XML comment ignored for member "M:Lucene.Net.Documents.Document.SetBoost(System.Single)"
-->
         <!-- Badly formed XML comment ignored for member "M:Lucene.Net.Documents.Document.GetBoost"
-->
         <member name="M:Lucene.Net.Documents.Document.Add(Lucene.Net.Documents.Field)">
@@ -2288,7 +2292,7 @@
             <returns> true iff exclusive access is obtained
             </returns>
         </member>
-        <member name="M:Lucene.Net.Store.Lock.obtain(System.Int64)">
+        <member name="M:Lucene.Net.Store.Lock.Obtain(System.Int64)">
             <summary>Attempts to obtain an exclusive lock within amount
             of time given. Currently polls once per second until
             lockWaitTimeout is passed.
@@ -4615,7 +4619,7 @@
         <!-- Badly formed XML comment ignored for member "M:Lucene.Net.Search.Similarity.Tf(System.Single)"
-->
         <!-- Badly formed XML comment ignored for member "M:Lucene.Net.Search.Similarity.Idf(Lucene.Net.Index.Term,Lucene.Net.Search.Searcher)"
-->
         <!-- Badly formed XML comment ignored for member "M:Lucene.Net.Search.Similarity.Idf(System.Collections.ICollection,Lucene.Net.Search.Searcher)"
-->
-        <!-- Badly formed XML comment ignored for member "M:Lucene.Net.Search.Similarity.Ldf(System.Int32,System.Int32)"
-->
+        <!-- Badly formed XML comment ignored for member "M:Lucene.Net.Search.Similarity.Idf(System.Int32,System.Int32)"
-->
         <!-- Badly formed XML comment ignored for member "M:Lucene.Net.Search.Similarity.Coord(System.Int32,System.Int32)"
-->
         <member name="M:Lucene.Net.Search.SimilarityDelegator.#ctor(Lucene.Net.Search.Similarity)">
             <summary>Construct a {@link Similarity} that delegates all methods to another.
@@ -4886,7 +4890,7 @@
         <member name="M:Lucene.Net.Search.DefaultSimilarity.SloppyFreq(System.Int32)">
             <summary>Implemented as <code>1 / (distance + 1)</code>. </summary>
         </member>
-        <member name="M:Lucene.Net.Search.DefaultSimilarity.Ldf(System.Int32,System.Int32)">
+        <member name="M:Lucene.Net.Search.DefaultSimilarity.Idf(System.Int32,System.Int32)">
             <summary>Implemented as <code>log(numDocs/(docFreq+1)) + 1</code>.
</summary>
         </member>
         <member name="M:Lucene.Net.Search.DefaultSimilarity.Coord(System.Int32,System.Int32)">
@@ -6060,6 +6064,18 @@
             Gets or sets a value indicating whether or not a thread is a background thread.
             </summary>
         </member>
+        <member name="T:SupportClass.FileSupport">
+            <summary>
+            Represents the methods to support some operations over files.
+            </summary>
+        </member>
+        <member name="M:SupportClass.FileSupport.GetFiles(System.IO.FileInfo)">
+            <summary>
+            Returns an array of abstract pathnames representing the files and directories
of the specified path.
+            </summary>
+            <param name="path">The abstract pathname to list it childs.</param>
+            <returns>An array of abstract pathnames childs of the path specified or
null if the path is not a directory</returns>
+        </member>
         <member name="T:SupportClass.Number">
             <summary>
             A simple class for number conversions.
@@ -6207,6 +6223,11 @@
             <param name="key"></param>
             <param name="defValue"></param>
             <returns></returns>
+        </member>
+        <member name="T:SupportClass.CompressionSupport">
+            <summary>
+            Use for .NET 1.1 Framework only.
+            </summary>
         </member>
         <member name="T:Lucene.Net.Search.PhrasePrefixQuery">
             <summary> PhrasePrefixQuery is a generalized version of PhraseQuery, with
an added

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldCache.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldCache.cs?view=diff&rev=479855&r1=479854&r2=479855
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldCache.cs (original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldCache.cs Mon Nov
27 18:35:00 2006
@@ -63,7 +63,7 @@
 	}
 	public interface FieldCache
 	{
-		
+        void Close(IndexReader reader);
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none is
 		/// found, reads the terms in <code>field</code> as integers and returns an
array

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldCacheImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldCacheImpl.cs?view=diff&rev=479855&r1=479854&r2=479855
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldCacheImpl.cs (original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldCacheImpl.cs Mon
Nov 27 18:35:00 2006
@@ -38,6 +38,21 @@
 	/// </version>
 	class FieldCacheImpl : FieldCache
 	{
+        public virtual void Close(IndexReader reader)
+        { 
+            lock (this) 
+            { 
+                System.Collections.Hashtable readerCache = (System.Collections.Hashtable)
cache[reader]; 
+                if (readerCache != null) 
+                { 
+                    readerCache.Clear(); 
+                    readerCache = null;
+                }
+
+                cache.Remove(reader); 
+            } 
+        }
+
 		public class AnonymousClassIntParser : IntParser
 		{
 			public virtual int ParseInt(System.String value_Renamed)

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldSortedHitQueue.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldSortedHitQueue.cs?view=diff&rev=479855&r1=479854&r2=479855
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldSortedHitQueue.cs
(original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/FieldSortedHitQueue.cs
Mon Nov 27 18:35:00 2006
@@ -39,6 +39,21 @@
 	/// </seealso>
 	class FieldSortedHitQueue : PriorityQueue
 	{
+		internal static void Close(IndexReader reader) 
+		{ 
+			lock (Comparators.SyncRoot) 
+			{ 
+				System.Collections.Hashtable readerCache = (System.Collections.Hashtable) Comparators[reader];

+				if (readerCache != null) 
+				{ 
+					readerCache.Clear(); 
+					readerCache = null;
+				} 
+
+				Comparators.Remove(reader);
+			} 
+		}
+
 		private class AnonymousClassScoreDocComparator : ScoreDocComparator
 		{
 			public AnonymousClassScoreDocComparator(int[] fieldOrder)

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/IndexSearcher.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/IndexSearcher.cs?view=diff&rev=479855&r1=479854&r2=479855
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/IndexSearcher.cs (original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Search/IndexSearcher.cs Mon
Nov 27 18:35:00 2006
@@ -185,8 +185,13 @@
 		/// </summary>
 		public override void  Close()
 		{
-			if (closeReader)
-				reader.Close();
+            if (closeReader)
+            {
+                FieldSortedHitQueue.Close(reader); 
+                Lucene.Net.Search.FieldCache_Fields.DEFAULT.Close(reader);
+
+                reader.Close();
+            }
 		}
 		
 		// inherit javadoc



Mime
View raw message