lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r890231 - in /incubator/lucene.net/trunk/C#/src/Lucene.Net/Index: CheckIndex.cs DirectoryOwningReader.cs DirectoryReader.cs FilterIndexReader.cs IndexCommitPoint.cs IndexModifier.cs IndexReader.cs IndexWriter.cs
Date Mon, 14 Dec 2009 08:57:58 GMT
Author: digy
Date: Mon Dec 14 08:57:55 2009
New Revision: 890231

URL: http://svn.apache.org/viewvc?rev=890231&view=rev
Log:
[3] Added Obsolete attribute to deprecated methods/classes of Lucene.Java 2.9.1 

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/CheckIndex.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DirectoryOwningReader.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DirectoryReader.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/FilterIndexReader.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexCommitPoint.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexModifier.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexReader.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/CheckIndex.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/CheckIndex.cs?rev=890231&r1=890230&r2=890231&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/CheckIndex.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/CheckIndex.cs Mon Dec 14 08:57:55 2009
@@ -301,6 +301,7 @@
 		/// <summary>Returns true if index is clean, else false. </summary>
 		/// <deprecated> Please instantiate a CheckIndex and then use {@link #CheckIndex()}
instead 
 		/// </deprecated>
+        [Obsolete("Please instantiate a CheckIndex and then use CheckIndex() instead")]
 		public static bool Check(Directory dir, bool doFix)
 		{
 			return Check(dir, doFix, null);
@@ -309,6 +310,7 @@
 		/// <summary>Returns true if index is clean, else false.</summary>
 		/// <deprecated> Please instantiate a CheckIndex and then use {@link #CheckIndex(List)}
instead 
 		/// </deprecated>
+        [Obsolete("Please instantiate a CheckIndex and then use CheckIndex(List) instead")]
 		public static bool Check(Directory dir, bool doFix, System.Collections.IList onlySegments)
 		{
 			CheckIndex checker = new CheckIndex(dir);

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DirectoryOwningReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/DirectoryOwningReader.cs?rev=890231&r1=890230&r2=890231&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DirectoryOwningReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DirectoryOwningReader.cs Mon Dec 14
08:57:55 2009
@@ -27,6 +27,7 @@
 	/// <deprecated> This helper class is removed with all String/File
 	/// IndexReader.open() methods in Lucene 3.0
 	/// </deprecated>
+    [Obsolete("This helper class is removed with all String/File IndexReader.open() methods
in Lucene 3.0")]
 	sealed class DirectoryOwningReader:FilterIndexReader, System.ICloneable
 	{
 		

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DirectoryReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/DirectoryReader.cs?rev=890231&r1=890230&r2=890231&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DirectoryReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/DirectoryReader.cs Mon Dec 14 08:57:55
2009
@@ -886,6 +886,7 @@
 		
 		/// <deprecated>  
 		/// </deprecated>
+        [Obsolete]
 		protected internal override void  DoCommit()
 		{
 			DoCommit(null);

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/FilterIndexReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/FilterIndexReader.cs?rev=890231&r1=890230&r2=890231&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/FilterIndexReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/FilterIndexReader.cs Mon Dec 14 08:57:55
2009
@@ -284,6 +284,7 @@
 		
 		/// <deprecated> 
 		/// </deprecated>
+        [Obsolete]
 		protected internal override void  DoCommit()
 		{
 			DoCommit(null);

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexCommitPoint.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/IndexCommitPoint.cs?rev=890231&r1=890230&r2=890231&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexCommitPoint.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexCommitPoint.cs Mon Dec 14 08:57:55
2009
@@ -22,7 +22,7 @@
 	
 	/// <deprecated> Please subclass IndexCommit class instead
 	/// </deprecated>
-	
+    [Obsolete("Please subclass IndexCommit class instead")]
 	public interface IndexCommitPoint
 	{
 		

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexModifier.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/IndexModifier.cs?rev=890231&r1=890230&r2=890231&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexModifier.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexModifier.cs Mon Dec 14 08:57:55
2009
@@ -88,6 +88,7 @@
 	/// </summary>
 	/// <deprecated> Please use {@link IndexWriter} instead.
 	/// </deprecated>
+    [Obsolete("Please use IndexWriter instead.")]
 	public class IndexModifier
 	{
 		private void  InitBlock()

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/IndexReader.cs?rev=890231&r1=890230&r2=890231&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexReader.cs Mon Dec 14 08:57:55
2009
@@ -112,6 +112,7 @@
 			public static readonly FieldOption OMIT_TERM_FREQ_AND_POSITIONS = new FieldOption("OMIT_TERM_FREQ_AND_POSITIONS");
 			/// <deprecated> Renamed to {@link #OMIT_TERM_FREQ_AND_POSITIONS} 
 			/// </deprecated>
+            [Obsolete("Renamed to OMIT_TERM_FREQ_AND_POSITIONS")]
 			public static readonly FieldOption OMIT_TF;
 			/// <summary>All fields which are not indexed </summary>
 			public static readonly FieldOption UNINDEXED = new FieldOption("UNINDEXED");
@@ -205,6 +206,7 @@
 		/// </deprecated>
 		/// <seealso cref="Directory()">
 		/// </seealso>
+        [Obsolete("will be deleted when IndexReader(Directory) is deleted")]
 		private Directory directory;
 		
 		/// <summary> Legacy Constructor for backwards compatibility.
@@ -223,6 +225,7 @@
 		/// </seealso>
 		/// <deprecated> - use IndexReader()
 		/// </deprecated>
+        [Obsolete("- use IndexReader()")]
 		protected internal IndexReader(Directory directory):this()
 		{
 			this.directory = directory;
@@ -910,6 +913,7 @@
 		/// <throws>  IllegalStateException if the term index has already been loaded into
memory </throws>
 		/// <deprecated> Please use {@link IndexReader#Open(Directory, IndexDeletionPolicy,
boolean, int)} to specify the required TermInfos index divisor instead.
 		/// </deprecated>
+        [Obsolete("Please use IndexReader.Open(Directory, IndexDeletionPolicy, bool, int)
to specify the required TermInfos index divisor instead.")]
 		public virtual void  SetTermInfosIndexDivisor(int indexDivisor)
 		{
 			throw new System.NotSupportedException("Please pass termInfosIndexDivisor up-front when
opening IndexReader");
@@ -1515,6 +1519,7 @@
 		/// <deprecated> Please implement {@link #DoCommit(Map)
 		/// instead}. 
 		/// </deprecated>
+        [Obsolete("Please implement DoCommit(IDictionary<string, string>) instead")]
 		protected internal abstract void  DoCommit();
 		
 		/// <summary>Implements commit.  NOTE: subclasses should override
@@ -1569,6 +1574,7 @@
 		/// This method will be removed in the 3.0 release.
 		/// 
 		/// </deprecated>
+        [Obsolete("Please use IndexWriter.IsLocked(Directory) instead. This method will be
removed in the 3.0 release.")]
 		public static bool IsLocked(Directory directory)
 		{
 			return directory.MakeLock(IndexWriter.WRITE_LOCK_NAME).IsLocked();
@@ -1608,6 +1614,7 @@
 		/// This method will be removed in the 3.0 release.
 		/// 
 		/// </deprecated>
+        [Obsolete("Please use IndexWriter.Unlock(Directory) instead. This method will be
removed in the 3.0 release.")]
 		public static void  Unlock(Directory directory)
 		{
 			directory.MakeLock(IndexWriter.WRITE_LOCK_NAME).Release();
@@ -1762,6 +1769,7 @@
 		/// <summary>Expert    </summary>
 		/// <deprecated> 
 		/// </deprecated>
+        [Obsolete]
 		public virtual System.Object GetFieldCacheKey()
 		{
 			return this;
@@ -1794,6 +1802,7 @@
 		/// true, meaning the norms() methods will return null for
 		/// fields that had disabled norms.
 		/// </deprecated>
+        [Obsolete("This currently defaults to false (to remain back-compatible), but in 3.0
it will be hardwired to true, meaning the norms() methods will return null for fields that
had disabled norms.")]
 		public virtual bool GetDisableFakeNorms()
 		{
 			return disableFakeNorms;
@@ -1807,6 +1816,7 @@
 		/// true, meaning the norms() methods will return null for
 		/// fields that had disabled norms.
 		/// </deprecated>
+        [Obsolete("This currently defaults to false (to remain back-compatible), but in 3.0
it will be hardwired to true, meaning the norms() methods will return null for fields that
had disabled norms.")]
 		public virtual void  SetDisableFakeNorms(bool disableFakeNorms)
 		{
 			this.disableFakeNorms = disableFakeNorms;

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/IndexWriter.cs?rev=890231&r1=890230&r2=890231&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs Mon Dec 14 08:57:55
2009
@@ -223,6 +223,7 @@
 		/// </deprecated>
 		/// <seealso cref="LogMergePolicy.DEFAULT_MERGE_FACTOR">
 		/// </seealso>
+        [Obsolete("See LogMergePolicy.DEFAULT_MERGE_FACTOR")]
 		public static readonly int DEFAULT_MERGE_FACTOR;
 		
 		/// <summary> Value to denote a flush trigger is disabled</summary>
@@ -247,6 +248,7 @@
 		/// </deprecated>
 		/// <seealso cref="LogDocMergePolicy.DEFAULT_MAX_MERGE_DOCS">
 		/// </seealso>
+        [Obsolete("See LogDocMergePolicy.DEFAULT_MAX_MERGE_DOCS")]
 		public static readonly int DEFAULT_MAX_MERGE_DOCS;
 		
 		/// <summary> Default value is 10,000. Change using {@link #SetMaxFieldLength(int)}.</summary>
@@ -1123,6 +1125,7 @@
 		/// #IndexWriter(Directory,Analyzer,boolean,MaxFieldLength)}
 		/// instead, and call {@link #Commit()} when needed.
 		/// </deprecated>
+        [Obsolete("This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,bool,MaxFieldLength)
instead, and call Commit() when needed")]
 		public IndexWriter(System.String path, Analyzer a, bool create)
 		{
 			InitBlock();
@@ -1199,6 +1202,7 @@
 		/// #IndexWriter(Directory,Analyzer,boolean,MaxFieldLength)}
 		/// instead, and call {@link #Commit()} when needed.
 		/// </deprecated>
+        [Obsolete("This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,bool,MaxFieldLength)
instead, and call Commit() when needed.")]
 		public IndexWriter(System.IO.FileInfo path, Analyzer a, bool create)
 		{
 			InitBlock();
@@ -1270,6 +1274,7 @@
 		/// release, and call {@link #Commit()} when needed.
 		/// Use {@link #IndexWriter(Directory,Analyzer,boolean,MaxFieldLength)} instead.
 		/// </deprecated>
+        [Obsolete("This constructor will be removed in the 3.0 release, and call Commit()
when needed. Use IndexWriter(Directory,Analyzer,bool,MaxFieldLength) instead.")]
 		public IndexWriter(Directory d, Analyzer a, bool create)
 		{
 			InitBlock();
@@ -1334,6 +1339,7 @@
 		/// release, and call {@link #Commit()} when needed.
 		/// Use {@link #IndexWriter(Directory,Analyzer,MaxFieldLength)} instead.
 		/// </deprecated>
+        [Obsolete("This constructor will be removed in the 3.0 release, and call Commit()
when needed. Use IndexWriter(Directory,Analyzer,MaxFieldLength) instead.")]
 		public IndexWriter(System.String path, Analyzer a)
 		{
 			InitBlock();
@@ -1399,6 +1405,7 @@
 		/// Use {@link #IndexWriter(Directory,Analyzer,MaxFieldLength)}
 		/// instead, and call {@link #Commit()} when needed.
 		/// </deprecated>
+        [Obsolete("This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,MaxFieldLength)
instead, and call Commit() when needed.")]
 		public IndexWriter(System.IO.FileInfo path, Analyzer a)
 		{
 			InitBlock();
@@ -1461,6 +1468,7 @@
 		/// #IndexWriter(Directory,Analyzer,MaxFieldLength)}
 		/// instead, and call {@link #Commit()} when needed.
 		/// </deprecated>
+        [Obsolete("This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,MaxFieldLength)
instead, and call Commit() when needed.")]
 		public IndexWriter(Directory d, Analyzer a)
 		{
 			InitBlock();
@@ -1493,6 +1501,7 @@
 		/// #IndexWriter(Directory,Analyzer,MaxFieldLength)}
 		/// instead, and call {@link #Commit()} when needed.
 		/// </deprecated>
+        [Obsolete("This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,MaxFieldLength)
instead, and call Commit() when needed.")]
 		public IndexWriter(Directory d, bool autoCommit, Analyzer a)
 		{
 			InitBlock();
@@ -1530,6 +1539,7 @@
 		/// #IndexWriter(Directory,Analyzer,boolean,MaxFieldLength)}
 		/// instead, and call {@link #Commit()} when needed.
 		/// </deprecated>
+        [Obsolete("This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,boolean,MaxFieldLength)
instead, and call Commit() when needed.")]
 		public IndexWriter(Directory d, bool autoCommit, Analyzer a, bool create)
 		{
 			InitBlock();
@@ -1597,6 +1607,7 @@
 		/// #IndexWriter(Directory,Analyzer,IndexDeletionPolicy,MaxFieldLength)}
 		/// instead, and call {@link #Commit()} when needed.
 		/// </deprecated>
+        [Obsolete("This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,IndexDeletionPolicy,MaxFieldLength)
instead, and call Commit() when needed.")]
 		public IndexWriter(Directory d, bool autoCommit, Analyzer a, IndexDeletionPolicy deletionPolicy)
 		{
 			InitBlock();
@@ -1724,6 +1735,7 @@
 		/// #IndexWriter(Directory,Analyzer,boolean,IndexDeletionPolicy,MaxFieldLength)}
 		/// instead, and call {@link #Commit()} when needed.
 		/// </deprecated>
+        [Obsolete("This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,boolean,IndexDeletionPolicy,MaxFieldLength)
instead, and call Commit() when needed.")]
 		public IndexWriter(Directory d, bool autoCommit, Analyzer a, bool create, IndexDeletionPolicy
deletionPolicy)
 		{
 			InitBlock();
@@ -2265,6 +2277,7 @@
 		/// <deprecated> This will be removed in 3.0, when
 		/// autoCommit=true is removed from IndexWriter.
 		/// </deprecated>
+        [Obsolete("This will be removed in 3.0, when autoCommit=true is removed from IndexWriter.")]
 		public virtual double GetMaxSyncPauseSeconds()
 		{
 			return maxSyncPauseSeconds;
@@ -2278,6 +2291,7 @@
 		/// <deprecated> This will be removed in 3.0, when
 		/// autoCommit=true is removed from IndexWriter.
 		/// </deprecated>
+        [Obsolete("This will be removed in 3.0, when autoCommit=true is removed from IndexWriter.")]
 		public virtual void  SetMaxSyncPauseSeconds(double seconds)
 		{
 			maxSyncPauseSeconds = seconds;
@@ -2678,6 +2692,7 @@
 		/// method) or {@link #NumDocs()} (also takes deletions
 		/// into account), instead. 
 		/// </deprecated>
+        [Obsolete("Please use MaxDoc() (same as this method) or NumDocs() (also takes deletions
into account), instead. ")]
 		public virtual int DocCount()
 		{
 			lock (this)
@@ -3776,6 +3791,7 @@
 		
 		/// <deprecated> Please use {@link #rollback} instead.
 		/// </deprecated>
+        [Obsolete("Please use Rollback instead.")]
 		public virtual void  Abort()
 		{
 			Rollback();
@@ -4636,6 +4652,7 @@
 		/// </deprecated>
 		/// <throws>  CorruptIndexException if the index is corrupt </throws>
 		/// <throws>  IOException if there is a low-level IO error </throws>
+        [Obsolete("please call Commit() instead")]
 		public void  Flush()
 		{
 			if (hitOOM)
@@ -5654,6 +5671,7 @@
 		/// <deprecated> -- this will be removed in 3.0 when
 		/// autoCommit is hardwired to false 
 		/// </deprecated>
+        [Obsolete("-- this will be removed in 3.0 when autoCommit is hardwired to false ")]
 		private bool DoCommitBeforeMergeCFS(MergePolicy.OneMerge merge)
 		{
 			lock (this)
@@ -6206,6 +6224,7 @@
 		/// <deprecated> -- this will be removed in 3.0 when
 		/// autoCommit is hardwired to false 
 		/// </deprecated>
+        [Obsolete("-- this will be removed in 3.0 when autoCommit is hardwired to false ")]
 		private void  SyncPause(long sizeInBytes)
 		{
 			if (mergeScheduler is ConcurrentMergeScheduler && maxSyncPauseSeconds > 0)



Mime
View raw message