You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/06/01 22:49:02 UTC
[6/9] lucenenet git commit: SWEEP: Lucene.Net.Index: Fixed up
documentation comments for types starting with M-Z
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/ParallelAtomicReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/ParallelAtomicReader.cs b/src/Lucene.Net/Index/ParallelAtomicReader.cs
index 95ee25e..8de62a6 100644
--- a/src/Lucene.Net/Index/ParallelAtomicReader.cs
+++ b/src/Lucene.Net/Index/ParallelAtomicReader.cs
@@ -26,19 +26,19 @@ namespace Lucene.Net.Index
using IBits = Lucene.Net.Util.IBits;
/// <summary>
- /// An <seealso cref="AtomicReader"/> which reads multiple, parallel indexes. Each index
+ /// An <see cref="AtomicReader"/> which reads multiple, parallel indexes. Each index
/// added must have the same number of documents, but typically each contains
/// different fields. Deletions are taken from the first reader.
/// Each document contains the union of the fields of all documents
/// with the same document number. When searching, matches for a
/// query term are from the first index added that has the field.
///
- /// <p>this is useful, e.g., with collections that have large fields which
+ /// <para/>This is useful, e.g., with collections that have large fields which
/// change rarely and small fields that change more frequently. The smaller
/// fields may be re-indexed in a new index and both indexes may be searched
/// together.
///
- /// <p><strong>Warning:</strong> It is up to you to make sure all indexes
+ /// <para/><strong>Warning:</strong> It is up to you to make sure all indexes
/// are created and modified the same way. For example, if you add
/// documents to one index, you need to add the same documents in the
/// same order to the other indexes. <em>Failure to do so will result in
@@ -67,8 +67,8 @@ namespace Lucene.Net.Index
private readonly IDictionary<string, AtomicReader> tvFieldToReader = new SortedDictionary<string, AtomicReader>(StringComparer.Ordinal);
/// <summary>
- /// Create a ParallelAtomicReader based on the provided
- /// readers; auto-closes the given readers on <seealso cref="#close()"/>.
+ /// Create a <see cref="ParallelAtomicReader"/> based on the provided
+ /// readers; auto-disposes the given <paramref name="readers"/> on <see cref="IndexReader.Dispose()"/>.
/// </summary>
public ParallelAtomicReader(params AtomicReader[] readers)
: this(true, readers)
@@ -76,8 +76,8 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Create a ParallelAtomicReader based on the provided
- /// readers.
+ /// Create a <see cref="ParallelAtomicReader"/> based on the provided
+ /// <paramref name="readers"/>.
/// </summary>
public ParallelAtomicReader(bool closeSubReaders, params AtomicReader[] readers)
: this(closeSubReaders, readers, readers)
@@ -85,9 +85,9 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Expert: create a ParallelAtomicReader based on the provided
- /// readers and storedFieldReaders; when a document is
- /// loaded, only storedFieldsReaders will be used.
+ /// Expert: create a <see cref="ParallelAtomicReader"/> based on the provided
+ /// <paramref name="readers"/> and <paramref name="storedFieldsReaders"/>; when a document is
+ /// loaded, only <paramref name="storedFieldsReaders"/> will be used.
/// </summary>
public ParallelAtomicReader(bool closeSubReaders, AtomicReader[] readers, AtomicReader[] storedFieldsReaders)
{
@@ -229,11 +229,12 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// {@inheritDoc}
- /// <p>
+ /// Get the <see cref="Index.FieldInfos"/> describing all fields in
+ /// this reader.
+ /// <para/>
/// NOTE: the returned field numbers will likely not
/// correspond to the actual field numbers in the underlying
- /// readers, and codec metadata (<seealso cref="FieldInfo#getAttribute(String)"/>
+ /// readers, and codec metadata (<see cref="FieldInfo.GetAttribute(string)"/>
/// will be unavailable.
/// </summary>
public override FieldInfos FieldInfos
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/ParallelCompositeReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/ParallelCompositeReader.cs b/src/Lucene.Net/Index/ParallelCompositeReader.cs
index c35642a..7d552e1 100644
--- a/src/Lucene.Net/Index/ParallelCompositeReader.cs
+++ b/src/Lucene.Net/Index/ParallelCompositeReader.cs
@@ -24,27 +24,27 @@ namespace Lucene.Net.Index
*/
/// <summary>
- /// An <seealso cref="CompositeReader"/> which reads multiple, parallel indexes. Each index added
+ /// A <see cref="CompositeReader"/> which reads multiple, parallel indexes. Each index added
/// must have the same number of documents, and exactly the same hierarchical subreader structure,
/// but typically each contains different fields. Deletions are taken from the first reader.
/// Each document contains the union of the fields of all
/// documents with the same document number. When searching, matches for a
/// query term are from the first index added that has the field.
///
- /// <p>this is useful, e.g., with collections that have large fields which
+ /// <para/>This is useful, e.g., with collections that have large fields which
/// change rarely and small fields that change more frequently. The smaller
/// fields may be re-indexed in a new index and both indexes may be searched
/// together.
///
- /// <p><strong>Warning:</strong> It is up to you to make sure all indexes
+ /// <para/><strong>Warning:</strong> It is up to you to make sure all indexes
/// are created and modified the same way. For example, if you add
/// documents to one index, you need to add the same documents in the
/// same order to the other indexes. <em>Failure to do so will result in
/// undefined behavior</em>.
- /// A good strategy to create suitable indexes with <seealso cref="IndexWriter"/> is to use
- /// <seealso cref="LogDocMergePolicy"/>, as this one does not reorder documents
- /// during merging (like {@code TieredMergePolicy}) and triggers merges
- /// by number of documents per segment. If you use different <seealso cref="MergePolicy"/>s
+ /// A good strategy to create suitable indexes with <see cref="IndexWriter"/> is to use
+ /// <see cref="LogDocMergePolicy"/>, as this one does not reorder documents
+ /// during merging (like <see cref="TieredMergePolicy"/>) and triggers merges
+ /// by number of documents per segment. If you use different <see cref="MergePolicy"/>s
/// it might happen that the segment structure of your index is no longer predictable.
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -56,8 +56,8 @@ namespace Lucene.Net.Index
private readonly ISet<IndexReader> completeReaderSet = new IdentityHashSet<IndexReader>();
/// <summary>
- /// Create a ParallelCompositeReader based on the provided
- /// readers; auto-closes the given readers on <seealso cref="#close()"/>.
+ /// Create a <see cref="ParallelCompositeReader"/> based on the provided
+ /// readers; auto-disposes the given <paramref name="readers"/> on <see cref="IndexReader.Dispose()"/>.
/// </summary>
public ParallelCompositeReader(params CompositeReader[] readers)
: this(true, readers)
@@ -65,8 +65,8 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Create a ParallelCompositeReader based on the provided
- /// readers.
+ /// Create a <see cref="ParallelCompositeReader"/> based on the provided
+ /// <paramref name="readers"/>.
/// </summary>
public ParallelCompositeReader(bool closeSubReaders, params CompositeReader[] readers)
: this(closeSubReaders, readers, readers)
@@ -74,9 +74,9 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Expert: create a ParallelCompositeReader based on the provided
- /// readers and storedFieldReaders; when a document is
- /// loaded, only storedFieldsReaders will be used.
+ /// Expert: create a <see cref="ParallelCompositeReader"/> based on the provided
+ /// <paramref name="readers"/> and <paramref name="storedFieldReaders"/>; when a document is
+ /// loaded, only <paramref name="storedFieldReaders"/> will be used.
/// </summary>
public ParallelCompositeReader(bool closeSubReaders, CompositeReader[] readers, CompositeReader[] storedFieldReaders)
: base(PrepareSubReaders(readers, storedFieldReaders))
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/PersistentSnapshotDeletionPolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/PersistentSnapshotDeletionPolicy.cs b/src/Lucene.Net/Index/PersistentSnapshotDeletionPolicy.cs
index b90405a..5d14564 100644
--- a/src/Lucene.Net/Index/PersistentSnapshotDeletionPolicy.cs
+++ b/src/Lucene.Net/Index/PersistentSnapshotDeletionPolicy.cs
@@ -30,21 +30,21 @@ namespace Lucene.Net.Index
using IOUtils = Lucene.Net.Util.IOUtils;
/// <summary>
- /// A <seealso cref="SnapshotDeletionPolicy"/> which adds a persistence layer so that
+ /// A <see cref="SnapshotDeletionPolicy"/> which adds a persistence layer so that
/// snapshots can be maintained across the life of an application. The snapshots
- /// are persisted in a <seealso cref="Directory"/> and are committed as soon as
- /// <seealso cref="#snapshot()"/> or <seealso cref="#release(IndexCommit)"/> is called.
- /// <p>
- /// <b>NOTE:</b> Sharing <seealso cref="PersistentSnapshotDeletionPolicy"/>s that write to
- /// the same directory across <seealso cref="IndexWriter"/>s will corrupt snapshots. You
- /// should make sure every <seealso cref="IndexWriter"/> has its own
- /// <seealso cref="PersistentSnapshotDeletionPolicy"/> and that they all write to a
- /// different <seealso cref="Directory"/>. It is OK to use the same
- /// Directory that holds the index.
- ///
- /// <p> this class adds a <seealso cref="#release(long)"/> method to
- /// release commits from a previous snapshot's <seealso cref="IndexCommit#getGeneration"/>.
+ /// are persisted in a <see cref="Directory"/> and are committed as soon as
+ /// <see cref="Snapshot()"/> or <see cref="Release(IndexCommit)"/> is called.
+ /// <para/>
+ /// <b>NOTE:</b> Sharing <see cref="PersistentSnapshotDeletionPolicy"/>s that write to
+ /// the same directory across <see cref="IndexWriter"/>s will corrupt snapshots. You
+ /// should make sure every <see cref="IndexWriter"/> has its own
+ /// <see cref="PersistentSnapshotDeletionPolicy"/> and that they all write to a
+ /// different <see cref="Directory"/>. It is OK to use the same
+ /// <see cref="Directory"/> that holds the index.
///
+ /// <para/> This class adds a <see cref="Release(long)"/> method to
+ /// release commits from a previous snapshot's <see cref="IndexCommit.Generation"/>.
+ /// <para/>
/// @lucene.experimental
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -66,17 +66,17 @@ namespace Lucene.Net.Index
private readonly Directory dir;
/// <summary>
- /// <seealso cref="PersistentSnapshotDeletionPolicy"/> wraps another
- /// <seealso cref="IndexDeletionPolicy"/> to enable flexible
- /// snapshotting, passing <seealso cref="OpenMode#CREATE_OR_APPEND"/>
+ /// <see cref="PersistentSnapshotDeletionPolicy"/> wraps another
+ /// <see cref="IndexDeletionPolicy"/> to enable flexible
+ /// snapshotting, passing <see cref="OpenMode.CREATE_OR_APPEND"/>
/// by default.
/// </summary>
/// <param name="primary">
- /// the <seealso cref="IndexDeletionPolicy"/> that is used on non-snapshotted
+ /// the <see cref="IndexDeletionPolicy"/> that is used on non-snapshotted
/// commits. Snapshotted commits, by definition, are not deleted until
- /// explicitly released via <seealso cref="#release"/>. </param>
+ /// explicitly released via <see cref="Release(IndexCommit)"/>. </param>
/// <param name="dir">
- /// the <seealso cref="Directory"/> which will be used to persist the snapshots
+ /// the <see cref="Directory"/> which will be used to persist the snapshots
/// information. </param>
public PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir)
: this(primary, dir, OpenMode.CREATE_OR_APPEND)
@@ -84,15 +84,15 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// <seealso cref="PersistentSnapshotDeletionPolicy"/> wraps another
- /// <seealso cref="IndexDeletionPolicy"/> to enable flexible snapshotting.
+ /// <see cref="PersistentSnapshotDeletionPolicy"/> wraps another
+ /// <see cref="IndexDeletionPolicy"/> to enable flexible snapshotting.
/// </summary>
/// <param name="primary">
- /// the <seealso cref="IndexDeletionPolicy"/> that is used on non-snapshotted
+ /// the <see cref="IndexDeletionPolicy"/> that is used on non-snapshotted
/// commits. Snapshotted commits, by definition, are not deleted until
- /// explicitly released via <seealso cref="#release"/>. </param>
+ /// explicitly released via <see cref="Release(IndexCommit)"/>. </param>
/// <param name="dir">
- /// the <seealso cref="Directory"/> which will be used to persist the snapshots
+ /// the <see cref="Directory"/> which will be used to persist the snapshots
/// information. </param>
/// <param name="mode">
/// specifies whether a new index should be created, deleting all
@@ -120,7 +120,7 @@ namespace Lucene.Net.Index
/// Snapshots the last commit. Once this method returns, the
/// snapshot information is persisted in the directory.
/// </summary>
- /// <seealso cref= SnapshotDeletionPolicy#snapshot </seealso>
+ /// <seealso cref="SnapshotDeletionPolicy.Snapshot()"/>
public override IndexCommit Snapshot()
{
lock (this)
@@ -156,7 +156,7 @@ namespace Lucene.Net.Index
/// Deletes a snapshotted commit. Once this method returns, the snapshot
/// information is persisted in the directory.
/// </summary>
- /// <seealso cref= SnapshotDeletionPolicy#release </seealso>
+ /// <seealso cref="SnapshotDeletionPolicy.Release(IndexCommit)"/>
public override void Release(IndexCommit commit)
{
lock (this)
@@ -191,8 +191,8 @@ namespace Lucene.Net.Index
/// Deletes a snapshotted commit by generation. Once this method returns, the snapshot
/// information is persisted in the directory.
/// </summary>
- /// <seealso cref= IndexCommit#getGeneration </seealso>
- /// <seealso cref= SnapshotDeletionPolicy#release </seealso>
+ /// <seealso cref="IndexCommit.Generation"/>
+ /// <seealso cref="SnapshotDeletionPolicy.Release(IndexCommit)"/>
public virtual void Release(long gen)
{
lock (this)
@@ -279,7 +279,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Returns the file name the snapshots are currently
- /// saved to, or null if no snapshots have been saved.
+ /// saved to, or <c>null</c> if no snapshots have been saved.
/// </summary>
public virtual string LastSaveFile
{
@@ -297,7 +297,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Reads the snapshots information from the given <seealso cref="Directory"/>. this
+ /// Reads the snapshots information from the given <see cref="Directory"/>. This
/// method can be used if the snapshots information is needed, however you
/// cannot instantiate the deletion policy (because e.g., some other process
/// keeps a lock on the snapshots directory).
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/PrefixCodedTerms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/PrefixCodedTerms.cs b/src/Lucene.Net/Index/PrefixCodedTerms.cs
index 7403384..b45d573 100644
--- a/src/Lucene.Net/Index/PrefixCodedTerms.cs
+++ b/src/Lucene.Net/Index/PrefixCodedTerms.cs
@@ -32,6 +32,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Prefix codes term instances (prefixes are shared)
+ /// <para/>
/// @lucene.experimental
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -136,7 +137,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Builds a PrefixCodedTerms: call add repeatedly, then finish. </summary>
+ /// Builds a <see cref="PrefixCodedTerms"/>: call add repeatedly, then finish. </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
@@ -186,8 +187,8 @@ namespace Lucene.Net.Index
}
}
- /// <summary>
- /// return finalized form </summary>
+ /// <returns>
+ /// finalized form </returns>
public virtual PrefixCodedTerms Finish()
{
try
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/RandomAccessOrds.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/RandomAccessOrds.cs b/src/Lucene.Net/Index/RandomAccessOrds.cs
index 5d777d4..f14a52d 100644
--- a/src/Lucene.Net/Index/RandomAccessOrds.cs
+++ b/src/Lucene.Net/Index/RandomAccessOrds.cs
@@ -20,12 +20,12 @@ namespace Lucene.Net.Index
*/
/// <summary>
- /// Extension of <seealso cref="SortedSetDocValues"/> that supports random access
+ /// Extension of <see cref="SortedSetDocValues"/> that supports random access
/// to the ordinals of a document.
- /// <p>
- /// Operations via this API are independent of the iterator api (<seealso cref="#nextOrd()"/>)
+ /// <para/>
+ /// Operations via this API are independent of the iterator api (<see cref="SortedSetDocValues.NextOrd()"/>)
/// and do not impact its state.
- /// <p>
+ /// <para/>
/// Codecs can optionally extend this API if they support constant-time access
/// to ordinals for the document.
/// </summary>
@@ -44,10 +44,10 @@ namespace Lucene.Net.Index
/// <summary>
/// Retrieve the ordinal for the current document (previously
- /// set by <seealso cref="#setDocument(int)"/> at the specified index.
- /// <p>
- /// An index ranges from {@code 0} to {@code cardinality()-1}.
- /// The first ordinal value is at index {@code 0}, the next at index {@code 1},
+ /// set by <see cref="SortedSetDocValues.SetDocument(int)"/> at the specified index.
+ /// <para/>
+ /// An index ranges from <c>0</c> to <c>Cardinality()-1</c>.
+ /// The first ordinal value is at index <c>0</c>, the next at index <c>1</c>,
/// and so on, as for array indexing. </summary>
/// <param name="index"> index of the ordinal for the document. </param>
/// <returns> ordinal for the document at the specified index. </returns>
@@ -55,7 +55,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Returns the cardinality for the current document (previously
- /// set by <seealso cref="#setDocument(int)"/>.
+ /// set by <see cref="SortedSetDocValues.SetDocument(int)"/>.
/// </summary>
public abstract int Cardinality();
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/ReaderManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/ReaderManager.cs b/src/Lucene.Net/Index/ReaderManager.cs
index 30ba2d5..186344e 100644
--- a/src/Lucene.Net/Index/ReaderManager.cs
+++ b/src/Lucene.Net/Index/ReaderManager.cs
@@ -23,42 +23,42 @@ namespace Lucene.Net.Index
using IndexSearcher = Lucene.Net.Search.IndexSearcher;
/// <summary>
- /// Utility class to safely share <seealso cref="DirectoryReader"/> instances across
- /// multiple threads, while periodically reopening. this class ensures each
- /// reader is closed only once all threads have finished using it.
+ /// Utility class to safely share <see cref="DirectoryReader"/> instances across
+ /// multiple threads, while periodically reopening. This class ensures each
+ /// reader is disposed only once all threads have finished using it.
+ /// <para/>
+ /// @lucene.experimental
/// </summary>
- /// <seealso cref= SearcherManager
- ///
- /// @lucene.experimental </seealso>
+ /// <seealso cref="SearcherManager"/>
public sealed class ReaderManager : ReferenceManager<DirectoryReader>
{
/// <summary>
- /// Creates and returns a new ReaderManager from the given
- /// <seealso cref="IndexWriter"/>.
+ /// Creates and returns a new <see cref="ReaderManager"/> from the given
+ /// <see cref="IndexWriter"/>.
/// </summary>
/// <param name="writer">
- /// the IndexWriter to open the IndexReader from. </param>
+ /// the <see cref="IndexWriter"/> to open the <see cref="IndexReader"/> from. </param>
/// <param name="applyAllDeletes">
- /// If <code>true</code>, all buffered deletes will be applied (made
- /// visible) in the <seealso cref="IndexSearcher"/> / <seealso cref="DirectoryReader"/>.
- /// If <code>false</code>, the deletes may or may not be applied, but
- /// remain buffered (in IndexWriter) so that they will be applied in
+ /// If <c>true</c>, all buffered deletes will be applied (made
+ /// visible) in the <see cref="IndexSearcher"/> / <see cref="DirectoryReader"/>.
+ /// If <c>false</c>, the deletes may or may not be applied, but
+ /// remain buffered (in <see cref="IndexWriter"/>) so that they will be applied in
/// the future. Applying deletes can be costly, so if your app can
/// tolerate deleted documents being returned you might gain some
- /// performance by passing <code>false</code>. See
- /// <seealso cref="DirectoryReader#openIfChanged(DirectoryReader, IndexWriter, boolean)"/>.
+ /// performance by passing <c>false</c>. See
+ /// <see cref="DirectoryReader.OpenIfChanged(DirectoryReader, IndexWriter, bool)"/>.
/// </param>
- /// <exception cref="IOException"> If there is a low-level I/O error </exception>
+ /// <exception cref="System.IO.IOException"> If there is a low-level I/O error </exception>
public ReaderManager(IndexWriter writer, bool applyAllDeletes)
{
Current = DirectoryReader.Open(writer, applyAllDeletes);
}
/// <summary>
- /// Creates and returns a new ReaderManager from the given <seealso cref="Directory"/>. </summary>
- /// <param name="dir"> the directory to open the DirectoryReader on.
+ /// Creates and returns a new <see cref="ReaderManager"/> from the given <see cref="Directory"/>. </summary>
+ /// <param name="dir"> the directory to open the <see cref="DirectoryReader"/> on.
/// </param>
- /// <exception cref="IOException"> If there is a low-level I/O error </exception>
+ /// <exception cref="System.IO.IOException"> If there is a low-level I/O error </exception>
public ReaderManager(Directory dir)
{
Current = DirectoryReader.Open(dir);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/ReaderSlice.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/ReaderSlice.cs b/src/Lucene.Net/Index/ReaderSlice.cs
index e12cb92..494fbaf 100644
--- a/src/Lucene.Net/Index/ReaderSlice.cs
+++ b/src/Lucene.Net/Index/ReaderSlice.cs
@@ -21,7 +21,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Subreader slice from a parent composite reader.
- ///
+ /// <para/>
/// @lucene.internal
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -30,7 +30,7 @@ namespace Lucene.Net.Index
public sealed class ReaderSlice
{
/// <summary>
- /// Zero-length {@code ReaderSlice} array. </summary>
+ /// Zero-length <see cref="ReaderSlice"/> array. </summary>
public static readonly ReaderSlice[] EMPTY_ARRAY = new ReaderSlice[0];
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/ReaderUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/ReaderUtil.cs b/src/Lucene.Net/Index/ReaderUtil.cs
index 065f60d..1ac8360 100644
--- a/src/Lucene.Net/Index/ReaderUtil.cs
+++ b/src/Lucene.Net/Index/ReaderUtil.cs
@@ -21,8 +21,8 @@ namespace Lucene.Net.Index
*/
/// <summary>
- /// Common util methods for dealing with <seealso cref="IndexReader"/>s and <seealso cref="IndexReaderContext"/>s.
- ///
+ /// Common util methods for dealing with <see cref="IndexReader"/>s and <see cref="IndexReaderContext"/>s.
+ /// <para/>
/// @lucene.internal
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -48,7 +48,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns index of the searcher/reader for document <code>n</code> in the
+ /// Returns index of the searcher/reader for document <c>n</c> in the
/// array used to construct this searcher/reader.
/// </summary>
public static int SubIndex(int n, int[] docStarts) // find
@@ -82,7 +82,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns index of the searcher/reader for document <code>n</code> in the
+ /// Returns index of the searcher/reader for document <c>n</c> in the
/// array used to construct this searcher/reader.
/// </summary>
public static int SubIndex(int n, IList<AtomicReaderContext> leaves) // find
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/ReadersAndUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/ReadersAndUpdates.cs b/src/Lucene.Net/Index/ReadersAndUpdates.cs
index b3d520c..c17a4c0 100644
--- a/src/Lucene.Net/Index/ReadersAndUpdates.cs
+++ b/src/Lucene.Net/Index/ReadersAndUpdates.cs
@@ -39,9 +39,11 @@ namespace Lucene.Net.Index
using NumericDocValuesField = NumericDocValuesField;
using TrackingDirectoryWrapper = Lucene.Net.Store.TrackingDirectoryWrapper;
- // Used by IndexWriter to hold open SegmentReaders (for
- // searching or merging), plus pending deletes and updates,
- // for a given segment
+ /// <summary>
+ /// Used by <see cref="IndexWriter"/> to hold open <see cref="SegmentReader"/>s (for
+ /// searching or merging), plus pending deletes and updates,
+ /// for a given segment
+ /// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
@@ -159,7 +161,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns a <seealso cref="SegmentReader"/>. </summary>
+ /// Returns a <see cref="SegmentReader"/>. </summary>
public virtual SegmentReader GetReader(IOContext context)
{
if (reader == null)
@@ -287,8 +289,8 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns a ref to a clone. NOTE: you should decRef() the reader when you're
- /// dont (ie do not call close()).
+ /// Returns a ref to a clone. NOTE: you should <see cref="DecRef()"/> the reader when you're
+ /// done (ie do not call <see cref="IndexReader.Dispose()"/>).
/// </summary>
public virtual SegmentReader GetReadOnlyClone(IOContext context)
{
@@ -735,178 +737,6 @@ namespace Lucene.Net.Index
}
}
- /*
- private class IterableAnonymousInnerClassHelper : IEnumerable<Number>
- {
- private readonly ReadersAndUpdates OuterInstance;
-
- private Lucene.Net.Index.SegmentReader Reader;
- private string Field;
- private Lucene.Net.Index.NumericDocValuesFieldUpdates FieldUpdates;
-
- public IterableAnonymousInnerClassHelper(ReadersAndUpdates outerInstance, Lucene.Net.Index.SegmentReader reader, string field, Lucene.Net.Index.NumericDocValuesFieldUpdates fieldUpdates)
- {
- this.OuterInstance = outerInstance;
- this.Reader = reader;
- this.Field = field;
- this.FieldUpdates = fieldUpdates;
- currentValues = reader.GetNumericDocValues(field);
- docsWithField = reader.GetDocsWithField(field);
- maxDoc = reader.MaxDoc;
- updatesIter = fieldUpdates.Iterator();
- }
-
- internal readonly NumericDocValues currentValues;
- internal readonly Bits docsWithField;
- internal readonly int maxDoc;
- internal readonly NumericDocValuesFieldUpdates.Iterator updatesIter;
- public virtual IEnumerator<Number> GetEnumerator()
- {
- updatesIter.Reset();
- return new IteratorAnonymousInnerClassHelper(this);
- }
-
- private class IteratorAnonymousInnerClassHelper : IEnumerator<Number>
- {
- private readonly IterableAnonymousInnerClassHelper OuterInstance;
-
- public IteratorAnonymousInnerClassHelper(IterableAnonymousInnerClassHelper outerInstance)
- {
- this.OuterInstance = outerInstance;
- curDoc = -1;
- updateDoc = updatesIter.NextDoc();
- }
-
- internal int curDoc;
- internal int updateDoc;
-
- public virtual bool HasNext()
- {
- return curDoc < maxDoc - 1;
- }
-
- public virtual Number Next()
- {
- if (++curDoc >= maxDoc)
- {
- throw new NoSuchElementException("no more documents to return values for");
- }
- if (curDoc == updateDoc) // this document has an updated value
- {
- long? value = updatesIter.value(); // either null (unset value) or updated value
- updateDoc = updatesIter.nextDoc(); // prepare for next round
- return value;
- }
- else
- {
- // no update for this document
- Debug.Assert(curDoc < updateDoc);
- if (currentValues != null && docsWithField.Get(curDoc))
- {
- // only read the current value if the document had a value before
- return currentValues.Get(curDoc);
- }
- else
- {
- return null;
- }
- }
- }
-
- public virtual void Remove()
- {
- throw new System.NotSupportedException("this iterator does not support removing elements");
- }
- }
- }*/
- /*
- private class IterableAnonymousInnerClassHelper2 : IEnumerable<BytesRef>
- {
- private readonly ReadersAndUpdates OuterInstance;
-
- private Lucene.Net.Index.SegmentReader Reader;
- private string Field;
- private Lucene.Net.Index.BinaryDocValuesFieldUpdates DvFieldUpdates;
-
- public IterableAnonymousInnerClassHelper2(ReadersAndUpdates outerInstance, Lucene.Net.Index.SegmentReader reader, string field, Lucene.Net.Index.BinaryDocValuesFieldUpdates dvFieldUpdates)
- {
- this.OuterInstance = outerInstance;
- this.Reader = reader;
- this.Field = field;
- this.DvFieldUpdates = dvFieldUpdates;
- currentValues = reader.GetBinaryDocValues(field);
- docsWithField = reader.GetDocsWithField(field);
- maxDoc = reader.MaxDoc;
- updatesIter = dvFieldUpdates.Iterator();
- }
-
- internal readonly BinaryDocValues currentValues;
- internal readonly Bits docsWithField;
- internal readonly int maxDoc;
- internal readonly BinaryDocValuesFieldUpdates.Iterator updatesIter;
- public virtual IEnumerator<BytesRef> GetEnumerator()
- {
- updatesIter.Reset();
- return new IteratorAnonymousInnerClassHelper2(this);
- }
-
- private class IteratorAnonymousInnerClassHelper2 : IEnumerator<BytesRef>
- {
- private readonly IterableAnonymousInnerClassHelper2 OuterInstance;
-
- public IteratorAnonymousInnerClassHelper2(IterableAnonymousInnerClassHelper2 outerInstance)
- {
- this.OuterInstance = outerInstance;
- curDoc = -1;
- updateDoc = updatesIter.nextDoc();
- scratch = new BytesRef();
- }
-
- internal int curDoc;
- internal int updateDoc;
- internal BytesRef scratch;
-
- public virtual bool HasNext()
- {
- return curDoc < maxDoc - 1;
- }
-
- public virtual BytesRef Next()
- {
- if (++curDoc >= maxDoc)
- {
- throw new NoSuchElementException("no more documents to return values for");
- }
- if (curDoc == updateDoc) // this document has an updated value
- {
- BytesRef value = updatesIter.value(); // either null (unset value) or updated value
- updateDoc = updatesIter.nextDoc(); // prepare for next round
- return value;
- }
- else
- {
- // no update for this document
- Debug.Assert(curDoc < updateDoc);
- if (currentValues != null && docsWithField.get(curDoc))
- {
- // only read the current value if the document had a value before
- currentValues.get(curDoc, scratch);
- return scratch;
- }
- else
- {
- return null;
- }
- }
- }
-
- public virtual void Remove()
- {
- throw new System.NotSupportedException("this iterator does not support removing elements");
- }
- }
- }*/
-
/// <summary>
/// Returns a reader for merge. this method applies field updates if there are
/// any and marks that this segment is currently merging.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/SegmentCommitInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentCommitInfo.cs b/src/Lucene.Net/Index/SegmentCommitInfo.cs
index b74e52e..e788d38 100644
--- a/src/Lucene.Net/Index/SegmentCommitInfo.cs
+++ b/src/Lucene.Net/Index/SegmentCommitInfo.cs
@@ -24,10 +24,10 @@ namespace Lucene.Net.Index
using Directory = Lucene.Net.Store.Directory;
/// <summary>
- /// Embeds a [read-only] SegmentInfo and adds per-commit
- /// fields.
- ///
- /// @lucene.experimental
+ /// Embeds a [read-only] <see cref="SegmentInfo"/> and adds per-commit
+ /// fields.
+ /// <para/>
+ /// @lucene.experimental
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
@@ -35,7 +35,7 @@ namespace Lucene.Net.Index
public class SegmentCommitInfo
{
/// <summary>
- /// The <seealso cref="SegmentInfo"/> that we wrap. </summary>
+ /// The <see cref="SegmentInfo"/> that we wrap. </summary>
public SegmentInfo Info { get; private set; }
// How many deleted docs in the segment:
@@ -65,13 +65,13 @@ namespace Lucene.Net.Index
/// Sole constructor.
/// </summary>
/// <param name="info">
- /// <seealso cref="SegmentInfo"/> that we wrap </param>
+ /// <see cref="SegmentInfo"/> that we wrap </param>
/// <param name="delCount">
/// number of deleted documents in this segment </param>
/// <param name="delGen">
/// deletion generation number (used to name deletion files) </param>
/// <param name="fieldInfosGen">
- /// FieldInfos generation number (used to name field-infos files)
+ /// <see cref="FieldInfos"/> generation number (used to name field-infos files)
/// </param>
public SegmentCommitInfo(SegmentInfo info, int delCount, long delGen, long fieldInfosGen)
{
@@ -127,8 +127,8 @@ namespace Lucene.Net.Index
/// <summary>
/// Called if there was an exception while writing
- /// deletes, so that we don't try to write to the same
- /// file more than once.
+ /// deletes, so that we don't try to write to the same
+ /// file more than once.
/// </summary>
internal virtual void AdvanceNextWriteDelGen()
{
@@ -136,7 +136,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Called when we succeed in writing a new FieldInfos generation. </summary>
+ /// Called when we succeed in writing a new <see cref="FieldInfos"/> generation. </summary>
internal virtual void AdvanceFieldInfosGen()
{
fieldInfosGen = nextWriteFieldInfosGen;
@@ -146,7 +146,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Called if there was an exception while writing a new generation of
- /// FieldInfos, so that we don't try to write to the same file more than once.
+ /// <see cref="FieldInfos"/>, so that we don't try to write to the same file more than once.
/// </summary>
internal virtual void AdvanceNextWriteFieldInfosGen()
{
@@ -155,8 +155,8 @@ namespace Lucene.Net.Index
/// <summary>
/// Returns total size in bytes of all files for this
- /// segment.
- /// <p><b>NOTE:</b> this value is not correct for 3.0 segments
+ /// segment.
+ /// <para/><b>NOTE:</b> this value is not correct for 3.0 segments
/// that have shared docstores. To get the correct value, upgrade!
/// </summary>
public virtual long GetSizeInBytes()
@@ -176,7 +176,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Returns all files in use by this segment. </summary>
- public virtual ICollection<string> Files()
+ public virtual ICollection<string> Files() // LUCENENET TODO: API Rename GetFiles()
{
// Start from the wrapped info's files:
ISet<string> files = new HashSet<string>(Info.GetFiles());
@@ -215,7 +215,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns true if there are any deletions for the
+ /// Returns <c>true</c> if there are any deletions for the
/// segment at this commit.
/// </summary>
public virtual bool HasDeletions
@@ -224,14 +224,14 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns true if there are any field updates for the segment in this commit. </summary>
+ /// Returns <c>true</c> if there are any field updates for the segment in this commit. </summary>
public virtual bool HasFieldUpdates
{
get { return fieldInfosGen != -1; }
}
/// <summary>
- /// Returns the next available generation number of the FieldInfos files. </summary>
+ /// Returns the next available generation number of the <see cref="FieldInfos"/> files. </summary>
public virtual long NextFieldInfosGen
{
get
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/SegmentCoreReaders.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentCoreReaders.cs b/src/Lucene.Net/Index/SegmentCoreReaders.cs
index ef9e870..e9b03fb 100644
--- a/src/Lucene.Net/Index/SegmentCoreReaders.cs
+++ b/src/Lucene.Net/Index/SegmentCoreReaders.cs
@@ -39,7 +39,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Holds core readers that are shared (unchanged) when
- /// SegmentReader is cloned or reopened
+ /// <see cref="SegmentReader"/> is cloned or reopened
/// </summary>
#if FEATURE_SERIALIZABLE
[Serializable]
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/SegmentDocValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentDocValues.cs b/src/Lucene.Net/Index/SegmentDocValues.cs
index d7992a5..8d65b07 100644
--- a/src/Lucene.Net/Index/SegmentDocValues.cs
+++ b/src/Lucene.Net/Index/SegmentDocValues.cs
@@ -31,7 +31,7 @@ namespace Lucene.Net.Index
using IOUtils = Lucene.Net.Util.IOUtils;
/// <summary>
- /// Manages the <seealso cref="DocValuesProducer"/> held by <seealso cref="SegmentReader"/> and
+ /// Manages the <see cref="DocValuesProducer"/> held by <see cref="SegmentReader"/> and
/// keeps track of their reference counting.
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -82,7 +82,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns the <seealso cref="DocValuesProducer"/> for the given generation. </summary>
+ /// Returns the <see cref="DocValuesProducer"/> for the given generation. </summary>
internal DocValuesProducer GetDocValuesProducer(long? gen, SegmentCommitInfo si, IOContext context, Directory dir, DocValuesFormat dvFormat, IList<FieldInfo> infos, int termsIndexDivisor)
{
lock (this)
@@ -103,7 +103,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Decrement the reference count of the given <seealso cref="DocValuesProducer"/>
+ /// Decrement the reference count of the given <see cref="DocValuesProducer"/>
/// generations.
/// </summary>
internal void DecRef(IList<long?> dvProducersGens)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/SegmentInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentInfo.cs b/src/Lucene.Net/Index/SegmentInfo.cs
index 2c342b6..1109130 100644
--- a/src/Lucene.Net/Index/SegmentInfo.cs
+++ b/src/Lucene.Net/Index/SegmentInfo.cs
@@ -31,7 +31,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Information about a segment such as it's name, directory, and files related
/// to the segment.
- ///
+ /// <para/>
/// @lucene.experimental
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -42,13 +42,13 @@ namespace Lucene.Net.Index
// TODO: remove these from this class, for now this is the representation
/// <summary>
/// Used by some member fields to mean not present (e.g.,
- /// norms, deletions).
+ /// norms, deletions).
/// </summary>
public static readonly int NO = -1; // e.g. no norms; no deletes;
/// <summary>
/// Used by some member fields to mean present (e.g.,
- /// norms, deletions).
+ /// norms, deletions).
/// </summary>
public static readonly int YES = 1; // e.g. have norms; have deletes;
@@ -68,7 +68,6 @@ namespace Lucene.Net.Index
private IDictionary<string, string> diagnostics;
- /// @deprecated not used anymore
[Obsolete("not used anymore")]
private IDictionary<string, string> attributes;
@@ -79,6 +78,9 @@ namespace Lucene.Net.Index
// see Constants.LUCENE_MAIN_VERSION.
private string version;
+ /// <summary>
+ /// Gets or Sets diagnostics saved into the segment when it was written.
+ /// </summary>
public IDictionary<string, string> Diagnostics
{
set
@@ -92,9 +94,9 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Construct a new complete SegmentInfo instance from input.
- /// <p>Note: this is public only to allow access from
- /// the codecs package.</p>
+ /// Construct a new complete <see cref="SegmentInfo"/> instance from input.
+ /// <para>Note: this is public only to allow access from
+ /// the codecs package.</para>
/// </summary>
public SegmentInfo(Directory dir, string version, string name, int docCount, bool isCompoundFile, Codec codec, IDictionary<string, string> diagnostics)
: this(dir, version, name, docCount, isCompoundFile, codec, diagnostics, null)
@@ -102,9 +104,9 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Construct a new complete SegmentInfo instance from input.
- /// <p>Note: this is public only to allow access from
- /// the codecs package.</p>
+ /// Construct a new complete <see cref="SegmentInfo"/> instance from input.
+ /// <para>Note: this is public only to allow access from
+ /// the codecs package.</para>
/// </summary>
public SegmentInfo(Directory dir, string version, string name, int docCount, bool isCompoundFile, Codec codec, IDictionary<string, string> diagnostics, IDictionary<string, string> attributes)
{
@@ -121,7 +123,6 @@ namespace Lucene.Net.Index
#pragma warning restore 612, 618
}
- /// @deprecated separate norms are not supported in >= 4.0
[Obsolete("separate norms are not supported in >= 4.0")]
internal bool HasSeparateNorms
{
@@ -129,10 +130,10 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Mark whether this segment is stored as a compound file.
+ /// Gets or Sets whether this segment is stored as a compound file.
+ /// <c>true</c> if this is a compound file;
+ /// else, <c>false</c>
/// </summary>
- /// <param name="isCompoundFile"> true if this is a compound file;
- /// else, false </param>
public bool UseCompoundFile
{
set
@@ -146,7 +147,8 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Can only be called once. </summary>
+ /// Gets or Sets <see cref="Codecs.Codec"/> that wrote this segment.
+ /// Setter can only be called once. </summary>
public Codec Codec
{
set
@@ -166,7 +168,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Returns number of documents in this segment (deletions
- /// are not taken into account).
+ /// are not taken into account).
/// </summary>
public int DocCount
{
@@ -189,7 +191,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Return all files referenced by this SegmentInfo. </summary>
+ /// Return all files referenced by this <see cref="SegmentInfo"/>. </summary>
public ISet<string> GetFiles()
{
if (setFiles == null)
@@ -207,13 +209,13 @@ namespace Lucene.Net.Index
/// <summary>
/// Used for debugging. Format may suddenly change.
///
- /// <p>Current format looks like
- /// <code>_a(3.1):c45/4</code>, which means the segment's
- /// name is <code>_a</code>; it was created with Lucene 3.1 (or
- /// '?' if it's unknown); it's using compound file
- /// format (would be <code>C</code> if not compound); it
- /// has 45 documents; it has 4 deletions (this part is
- /// left off when there are no deletions).</p>
+ /// <para>Current format looks like
+ /// <c>_a(3.1):c45/4</c>, which means the segment's
+ /// name is <c>_a</c>; it was created with Lucene 3.1 (or
+ /// '?' if it's unknown); it's using compound file
+ /// format (would be <c>C</c> if not compound); it
+ /// has 45 documents; it has 4 deletions (this part is
+ /// left off when there are no deletions).</para>
/// </summary>
public string ToString(Directory dir, int delCount)
{
@@ -239,8 +241,8 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// We consider another SegmentInfo instance equal if it
- /// has the same dir and same name.
+ /// We consider another <see cref="SegmentInfo"/> instance equal if it
+ /// has the same dir and same name.
/// </summary>
public override bool Equals(object obj)
{
@@ -268,11 +270,11 @@ namespace Lucene.Net.Index
/// Used by DefaultSegmentInfosReader to upgrade a 3.0 segment to record its
/// version is "3.0". this method can be removed when we're not required to
/// support 3x indexes anymore, e.g. in 5.0.
- /// <p>
+ /// <para/>
/// <b>NOTE:</b> this method is used for internal purposes only - you should
- /// not modify the version of a SegmentInfo, or it may result in unexpected
+ /// not modify the version of a <see cref="SegmentInfo"/>, or it may result in unexpected
/// exceptions thrown when you attempt to open the index.
- ///
+ /// <para/>
/// @lucene.internal
/// </summary>
public string Version
@@ -299,22 +301,20 @@ namespace Lucene.Net.Index
/// <summary>
/// Add these files to the set of files written for this
- /// segment.
+ /// segment.
/// </summary>
public void AddFiles(ICollection<string> files)
{
CheckFileNames(files);
- //SetFiles.AddAll(files);
setFiles.UnionWith(files);
}
/// <summary>
/// Add this file to the set of files written for this
- /// segment.
+ /// segment.
/// </summary>
public void AddFile(string file)
{
- //CheckFileNames(Collections.Singleton(file));
CheckFileNames(new[] { file });
setFiles.Add(file);
}
@@ -334,7 +334,6 @@ namespace Lucene.Net.Index
/// <summary>
/// Get a codec attribute value, or null if it does not exist
/// </summary>
- /// @deprecated no longer supported
[Obsolete("no longer supported")]
public string GetAttribute(string key)
{
@@ -352,15 +351,14 @@ namespace Lucene.Net.Index
/// <summary>
/// Puts a codec attribute value.
- /// <p>
- /// this is a key-value mapping for the field that the codec can use to store
+ /// <para/>
+ /// This is a key-value mapping for the field that the codec can use to store
/// additional metadata, and will be available to the codec when reading the
- /// segment via <seealso cref="#getAttribute(String)"/>
- /// <p>
+ /// segment via <see cref="GetAttribute(string)"/>
+ /// <para/>
/// If a value already exists for the field, it will be replaced with the new
/// value.
/// </summary>
- /// @deprecated no longer supported
[Obsolete("no longer supported")]
public string PutAttribute(string key, string value)
{
@@ -372,11 +370,8 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns the internal codec attributes map.
+ /// Returns the internal codec attributes map. May be null if no mappings exist.
/// </summary>
- /// <returns> internal codec attributes map. May be null if no mappings exist.
- /// </returns>
- /// @deprecated no longer supported
[Obsolete("no longer supported")]
public IDictionary<string, string> Attributes
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/SegmentInfos.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentInfos.cs b/src/Lucene.Net/Index/SegmentInfos.cs
index 5ad2b31..4eb63bf 100644
--- a/src/Lucene.Net/Index/SegmentInfos.cs
+++ b/src/Lucene.Net/Index/SegmentInfos.cs
@@ -44,68 +44,68 @@ namespace Lucene.Net.Index
/// <summary>
/// A collection of segmentInfo objects with methods for operating on
/// those segments in relation to the file system.
- /// <p>
+ /// <para>
/// The active segments in the index are stored in the segment info file,
- /// <tt>segments_N</tt>. There may be one or more <tt>segments_N</tt> files in the
+ /// <c>segments_N</c>. There may be one or more <c>segments_N</c> files in the
/// index; however, the one with the largest generation is the active one (when
/// older segments_N files are present it's because they temporarily cannot be
/// deleted, or, a writer is in the process of committing, or a custom
- /// <seealso cref="Lucene.Net.Index.IndexDeletionPolicy IndexDeletionPolicy"/>
- /// is in use). this file lists each segment by name and has details about the
+ /// <see cref="Lucene.Net.Index.IndexDeletionPolicy"/>
+ /// is in use). This file lists each segment by name and has details about the
/// codec and generation of deletes.
- /// </p>
- /// <p>There is also a file <tt>segments.gen</tt>. this file contains
- /// the current generation (the <tt>_N</tt> in <tt>segments_N</tt>) of the index.
- /// this is used only as a fallback in case the current generation cannot be
+ /// </para>
+ /// <para>There is also a file <c>segments.gen</c>. this file contains
+ /// the current generation (the <c>_N</c> in <c>segments_N</c>) of the index.
+ /// This is used only as a fallback in case the current generation cannot be
/// accurately determined by directory listing alone (as is the case for some NFS
- /// clients with time-based directory cache expiration). this file simply contains
- /// an <seealso cref="DataOutput#writeInt Int32"/> version header
- /// (<seealso cref="#FORMAT_SEGMENTS_GEN_CURRENT"/>), followed by the
- /// generation recorded as <seealso cref="DataOutput#writeLong Int64"/>, written twice.</p>
- /// <p>
+ /// clients with time-based directory cache expiration). This file simply contains
+ /// an <see cref="Store.DataOutput.WriteInt32(int)"/> version header
+ /// (<see cref="FORMAT_SEGMENTS_GEN_CURRENT"/>), followed by the
+ /// generation recorded as <see cref="Store.DataOutput.WriteInt64(long)"/>, written twice.</para>
+ /// <para>
/// Files:
- /// <ul>
- /// <li><tt>segments.gen</tt>: GenHeader, Generation, Generation, Footer
- /// <li><tt>segments_N</tt>: Header, Version, NameCounter, SegCount,
+ /// <list type="bullet">
+ /// <item><description><c>segments.gen</c>: GenHeader, Generation, Generation, Footer</description></item>
+ /// <item><description><c>segments_N</c>: Header, Version, NameCounter, SegCount,
/// <SegName, SegCodec, DelGen, DeletionCount, FieldInfosGen, UpdatesFiles><sup>SegCount</sup>,
- /// CommitUserData, Footer
- /// </ul>
- /// </p>
+ /// CommitUserData, Footer</description></item>
+ /// </list>
+ /// </para>
/// Data types:
- /// <p>
- /// <ul>
- /// <li>Header --> <seealso cref="CodecUtil#writeHeader CodecHeader"/></li>
- /// <li>GenHeader, NameCounter, SegCount, DeletionCount --> <seealso cref="DataOutput#writeInt Int32"/></li>
- /// <li>Generation, Version, DelGen, Checksum, FieldInfosGen --> <seealso cref="DataOutput#writeLong Int64"/></li>
- /// <li>SegName, SegCodec --> <seealso cref="DataOutput#writeString String"/></li>
- /// <li>CommitUserData --> <seealso cref="DataOutput#writeStringStringMap Map<String,String>"/></li>
- /// <li>UpdatesFiles --> <seealso cref="DataOutput#writeStringSet(Set) Set<String>"/></li>
- /// <li>Footer --> <seealso cref="CodecUtil#writeFooter CodecFooter"/></li>
- /// </ul>
- /// </p>
+ /// <para>
+ /// <list type="bullet">
+ /// <item><description>Header --> <see cref="CodecUtil.WriteHeader(Store.DataOutput, string, int)"/></description></item>
+ /// <item><description>GenHeader, NameCounter, SegCount, DeletionCount --> <see cref="Store.DataOutput.WriteInt32(int)"/></description></item>
+ /// <item><description>Generation, Version, DelGen, Checksum, FieldInfosGen --> <see cref="Store.DataOutput.WriteInt64(long)"/></description></item>
+ /// <item><description>SegName, SegCodec --> <see cref="Store.DataOutput.WriteString(string)"/></description></item>
+ /// <item><description>CommitUserData --> <see cref="Store.DataOutput.WriteStringStringMap(IDictionary{string, string})"/></description></item>
+ /// <item><description>UpdatesFiles --> <see cref="Store.DataOutput.WriteStringSet(ISet{string})"/></description></item>
+ /// <item><description>Footer --> <see cref="CodecUtil.WriteFooter(IndexOutput)"/></description></item>
+ /// </list>
+ /// </para>
/// Field Descriptions:
- /// <p>
- /// <ul>
- /// <li>Version counts how often the index has been changed by adding or deleting
- /// documents.</li>
- /// <li>NameCounter is used to generate names for new segment files.</li>
- /// <li>SegName is the name of the segment, and is used as the file name prefix for
- /// all of the files that compose the segment's index.</li>
- /// <li>DelGen is the generation count of the deletes file. If this is -1,
+ /// <para>
+ /// <list type="bullet">
+ /// <item><description>Version counts how often the index has been changed by adding or deleting
+ /// documents.</description></item>
+ /// <item><description>NameCounter is used to generate names for new segment files.</description></item>
+ /// <item><description>SegName is the name of the segment, and is used as the file name prefix for
+ /// all of the files that compose the segment's index.</description></item>
+ /// <item><description>DelGen is the generation count of the deletes file. If this is -1,
/// there are no deletes. Anything above zero means there are deletes
- /// stored by <seealso cref="LiveDocsFormat"/>.</li>
- /// <li>DeletionCount records the number of deleted documents in this segment.</li>
- /// <li>SegCodec is the <seealso cref="Codec#getName() name"/> of the Codec that encoded
- /// this segment.</li>
- /// <li>CommitUserData stores an optional user-supplied opaque
- /// Map<String,String> that was passed to
- /// <seealso cref="IndexWriter#setCommitData(java.util.Map)"/>.</li>
- /// <li>FieldInfosGen is the generation count of the fieldInfos file. If this is -1,
+ /// stored by <see cref="Codecs.LiveDocsFormat"/>.</description></item>
+ /// <item><description>DeletionCount records the number of deleted documents in this segment.</description></item>
+ /// <item><description>SegCodec is the <see cref="Codec.Name"/> of the <see cref="Codec"/> that encoded
+ /// this segment.</description></item>
+ /// <item><description>CommitUserData stores an optional user-supplied opaque
+ /// <see cref="T:IDictionary{string, string}"/> that was passed to
+ /// <see cref="IndexWriter.SetCommitData(IDictionary{string, string})"/>.</description></item>
+ /// <item><description>FieldInfosGen is the generation count of the fieldInfos file. If this is -1,
/// there are no updates to the fieldInfos in that segment. Anything above zero
- /// means there are updates to fieldInfos stored by <seealso cref="FieldInfosFormat"/>.</li>
- /// <li>UpdatesFiles stores the list of files that were updated in that segment.</li>
- /// </ul>
- /// </p>
+ /// means there are updates to fieldInfos stored by <see cref="Codecs.FieldInfosFormat"/>.</description></item>
+ /// <item><description>UpdatesFiles stores the list of files that were updated in that segment.</description></item>
+ /// </list>
+ /// </para>
///
/// @lucene.experimental
/// </summary>
@@ -149,30 +149,31 @@ namespace Lucene.Net.Index
// there was an IOException that had interrupted a commit
/// <summary>
- /// Opaque Map<String, String> that user can specify during IndexWriter.commit </summary>
+ /// Opaque <see cref="T:IDictionary{string, string}"/> that user can specify during <see cref="IndexWriter.Commit()"/> </summary>
private IDictionary<string, string> userData = Collections.EmptyMap<string, string>();
private List<SegmentCommitInfo> segments = new List<SegmentCommitInfo>();
/// <summary>
- /// If non-null, information about loading segments_N files </summary>
- /// will be printed here. <seealso cref= #setInfoStream. </seealso>
+ /// If non-null, information about loading segments_N files
+ /// will be printed here.</summary>
+ /// <seealso cref="InfoStream"/>
private static TextWriter infoStream = null;
/// <summary>
/// Sole constructor. Typically you call this and then
- /// use {@link #read(Directory) or
- /// #read(Directory,String)} to populate each {@link
- /// SegmentCommitInfo}. Alternatively, you can add/remove your
- /// own <seealso cref="SegmentCommitInfo"/>s.
+ /// use <see cref="Read(Directory)"/> or
+ /// <see cref="Read(Directory, string)"/> to populate each
+ /// <see cref="SegmentCommitInfo"/>. Alternatively, you can add/remove your
+ /// own <see cref="SegmentCommitInfo"/>s.
/// </summary>
public SegmentInfos()
{
}
/// <summary>
- /// Returns <seealso cref="SegmentCommitInfo"/> at the provided
- /// index.
+ /// Returns <see cref="SegmentCommitInfo"/> at the provided
+ /// index.
/// </summary>
public SegmentCommitInfo Info(int i)
{
@@ -183,7 +184,7 @@ namespace Lucene.Net.Index
/// Get the generation of the most recent commit to the
/// list of index files (N in the segments_N file).
/// </summary>
- /// <param name="files"> -- array of file names to check </param>
+ /// <param name="files"> array of file names to check </param>
public static long GetLastCommitGeneration(string[] files)
{
if (files == null)
@@ -209,7 +210,7 @@ namespace Lucene.Net.Index
/// Get the generation of the most recent commit to the
/// index in this directory (N in the segments_N file).
/// </summary>
- /// <param name="directory"> -- directory to search for the latest segments_N file </param>
+ /// <param name="directory"> directory to search for the latest segments_N file </param>
public static long GetLastCommitGeneration(Directory directory)
{
try
@@ -226,7 +227,7 @@ namespace Lucene.Net.Index
/// Get the filename of the segments_N file for the most
/// recent commit in the list of index files.
/// </summary>
- /// <param name="files"> -- array of file names to check </param>
+ /// <param name="files"> array of file names to check </param>
public static string GetLastCommitSegmentsFileName(string[] files)
{
@@ -237,7 +238,7 @@ namespace Lucene.Net.Index
/// Get the filename of the segments_N file for the most
/// recent commit to the index in this Directory.
/// </summary>
- /// <param name="directory"> -- directory to search for the latest segments_N file </param>
+ /// <param name="directory"> directory to search for the latest segments_N file </param>
public static string GetLastCommitSegmentsFileName(Directory directory)
{
return IndexFileNames.FileNameFromGeneration(IndexFileNames.SEGMENTS, "", GetLastCommitGeneration(directory));
@@ -272,14 +273,13 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// A utility for writing the <seealso cref="IndexFileNames#SEGMENTS_GEN"/> file to a
- /// <seealso cref="Directory"/>.
- ///
- /// <p>
+ /// A utility for writing the <see cref="IndexFileNames.SEGMENTS_GEN"/> file to a
+ /// <see cref="Directory"/>.
+ /// <para/>
/// <b>NOTE:</b> this is an internal utility which is kept public so that it's
/// accessible by code from other packages. You should avoid calling this
/// method unless you're absolutely sure what you're doing!
- ///
+ /// <para/>
/// @lucene.internal
/// </summary>
public static void WriteSegmentsGen(Directory dir, long generation)
@@ -335,11 +335,11 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Read a particular segmentFileName. Note that this may
- /// throw an IOException if a commit is in process.
+ /// Read a particular <paramref name="segmentFileName"/>. Note that this may
+ /// throw an <see cref="IOException"/> if a commit is in process.
/// </summary>
- /// <param name="directory"> -- directory containing the segments file </param>
- /// <param name="segmentFileName"> -- segment file to load </param>
+ /// <param name="directory"> directory containing the segments file </param>
+ /// <param name="segmentFileName"> segment file to load </param>
/// <exception cref="CorruptIndexException"> if the index is corrupt </exception>
/// <exception cref="IOException"> if there is a low-level IO error </exception>
public void Read(Directory directory, string segmentFileName)
@@ -457,8 +457,8 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Find the latest commit ({@code segments_N file}) and
- /// load all <seealso cref="SegmentCommitInfo"/>s.
+ /// Find the latest commit (<c>segments_N file</c>) and
+ /// load all <see cref="SegmentCommitInfo"/>s.
/// </summary>
public void Read(Directory directory)
{
@@ -695,9 +695,8 @@ namespace Lucene.Net.Index
/// <summary>
/// Returns a copy of this instance, also copying each
- /// SegmentInfo.
+ /// <see cref="SegmentInfo"/>.
/// </summary>
-
public object Clone()
{
var sis = (SegmentInfos)base.MemberwiseClone();
@@ -721,7 +720,7 @@ namespace Lucene.Net.Index
/// <summary>
- /// Counts how often the index has been changed.
+ /// Version number when this <see cref="SegmentInfos"/> was generated.
/// </summary>
public long Version { get; internal set; }
@@ -765,19 +764,21 @@ namespace Lucene.Net.Index
}
}
- /* Advanced configuration of retry logic in loading
- segments_N file */
+ /// <summary>
+ /// Advanced configuration of retry logic in loading
+ /// segments_N file
+ /// </summary>
private static int defaultGenLookaheadCount = 10;
/// <summary>
/// Gets or Sets the <see cref="defaultGenLookaheadCount"/>.
- ///
+ /// <para/>
/// Advanced: set how many times to try incrementing the
/// gen when loading the segments file. this only runs if
/// the primary (listing directory) and secondary (opening
/// segments.gen file) methods fail to find the segments
/// file.
- ///
+ /// <para/>
/// @lucene.experimental
/// </summary>
public static int DefaultGenLookaheadCount // LUCENENET specific: corrected spelling issue with the getter
@@ -793,8 +794,8 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Prints the given message to the infoStream. Note, this method does not
- /// check for null infoStream. It assumes this check has been performed by the
+ /// Prints the given message to the <see cref="InfoStream"/>. Note, this method does not
+ /// check for <c>null</c> <see cref="InfoStream"/>. It assumes this check has been performed by the
/// caller, which is recommended to avoid the (usually) expensive message
/// creation.
/// </summary>
@@ -805,7 +806,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Utility class for executing code that needs to do
- /// something with the current segments file. this is
+ /// something with the current segments file. This is
/// necessary with lock-less commits because from the time
/// you locate the current segments file name, until you
/// actually open it, read its contents, or check modified
@@ -824,8 +825,8 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Locate the most recent {@code segments} file and
- /// run <seealso cref="#doBody"/> on it.
+ /// Locate the most recent <c>segments</c> file and
+ /// run <see cref="DoBody(string)"/> on it.
/// </summary>
public virtual object Run()
{
@@ -833,7 +834,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Run <seealso cref="#doBody"/> on the provided commit. </summary>
+ /// Run <see cref="DoBody(string)"/> on the provided commit. </summary>
public virtual object Run(IndexCommit commit)
{
if (commit != null)
@@ -1097,7 +1098,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Subclass must implement this. The assumption is an
- /// IOException will be thrown if something goes wrong
+ /// <see cref="IOException"/> will be thrown if something goes wrong
/// during the processing that could have been caused by
/// a writer committing.
/// </summary>
@@ -1130,16 +1131,15 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Call this to start a commit. this writes the new
- /// segments file, but writes an invalid checksum at the
- /// end, so that it is not visible to readers. Once this
- /// is called you must call <seealso cref="#finishCommit"/> to complete
- /// the commit or <seealso cref="#rollbackCommit"/> to abort it.
- /// <p>
- /// Note: <seealso cref="#changed()"/> should be called prior to this
- /// method if changes have been made to this <seealso cref="SegmentInfos"/> instance
- /// </p>
- ///
+ /// Call this to start a commit. This writes the new
+ /// segments file, but writes an invalid checksum at the
+ /// end, so that it is not visible to readers. Once this
+ /// is called you must call <see cref="FinishCommit(Directory)"/> to complete
+ /// the commit or <see cref="RollbackCommit(Directory)"/> to abort it.
+ /// <para>
+ /// Note: <see cref="Changed()"/> should be called prior to this
+ /// method if changes have been made to this <see cref="SegmentInfos"/> instance
+ /// </para>
/// </summary>
internal void PrepareCommit(Directory dir)
{
@@ -1151,13 +1151,13 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns all file names referenced by SegmentInfo
- /// instances matching the provided Directory (ie files
- /// associated with any "external" segments are skipped).
- /// The returned collection is recomputed on each
- /// invocation.
+ /// Returns all file names referenced by <see cref="SegmentInfo"/>
+ /// instances matching the provided <see cref="Directory"/> (ie files
+ /// associated with any "external" segments are skipped).
+ /// The returned collection is recomputed on each
+ /// invocation.
/// </summary>
- public ICollection<string> Files(Directory dir, bool includeSegmentsFile)
+ public ICollection<string> Files(Directory dir, bool includeSegmentsFile) // LUCENENET TODO: API Rename GetFiles()
{
var files = new HashSet<string>();
if (includeSegmentsFile)
@@ -1261,13 +1261,12 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Writes & syncs to the Directory dir, taking care to
- /// remove the segments file on exception
- /// <p>
- /// Note: <seealso cref="#changed()"/> should be called prior to this
- /// method if changes have been made to this <seealso cref="SegmentInfos"/> instance
- /// </p>
- ///
+ /// Writes & syncs to the Directory dir, taking care to
+ /// remove the segments file on exception
+ /// <para>
+ /// Note: <see cref="Changed()"/> should be called prior to this
+ /// method if changes have been made to this <see cref="SegmentInfos"/> instance
+ /// </para>
/// </summary>
internal void Commit(Directory dir)
{
@@ -1295,16 +1294,16 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Return {@code userData} saved with this commit.
+ /// Gets <see cref="userData"/> saved with this commit.
/// </summary>
- /// <seealso cref= IndexWriter#commit() </seealso>
+ /// <seealso cref="IndexWriter.Commit()"/>
public IDictionary<string, string> UserData
{
get
{
return userData;
}
- set
+ internal set
{
if (value == null)
{
@@ -1319,8 +1318,8 @@ namespace Lucene.Net.Index
/// <summary>
/// Replaces all segments in this instance, but keeps
- /// generation, version, counter so that future commits
- /// remain write once.
+ /// generation, version, counter so that future commits
+ /// remain write once.
/// </summary>
internal void Replace(SegmentInfos other)
{
@@ -1330,7 +1329,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Returns sum of all segment's docCounts. Note that
- /// this does not include deletions
+ /// this does not include deletions
/// </summary>
public int TotalDocCount
{
@@ -1339,7 +1338,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Call this before committing if changes have been made to the
- /// segments.
+ /// segments.
/// </summary>
public void Changed()
{
@@ -1347,7 +1346,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// applies all changes caused by committing a merge to this SegmentInfos </summary>
+ /// applies all changes caused by committing a merge to this <see cref="SegmentInfos"/> </summary>
internal void ApplyMergeChanges(MergePolicy.OneMerge merge, bool dropSegment)
{
var mergedAway = new HashSet<SegmentCommitInfo>(merge.Segments);
@@ -1404,6 +1403,9 @@ namespace Lucene.Net.Index
this.AddAll(infos);
}
+ /// <summary>
+ /// Returns an <b>unmodifiable</b> <see cref="T:IEnumerator{SegmentCommitInfo}"/> of contained segments in order.
+ /// </summary>
public IEnumerator<SegmentCommitInfo> GetEnumerator()
{
return AsList().GetEnumerator();
@@ -1415,14 +1417,15 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns all contained segments as an <b>unmodifiable</b> <seealso cref="List"/> view. </summary>
+ /// Returns all contained segments as an <b>unmodifiable</b> <see cref="T:IList{SegmentCommitInfo}"/> view. </summary>
public IList<SegmentCommitInfo> AsList()
{
return Collections.UnmodifiableList<SegmentCommitInfo>(segments);
}
/// <summary>
- /// Returns number of <seealso cref="SegmentCommitInfo"/>s.
+ /// Returns number of <see cref="SegmentCommitInfo"/>s.
+ /// <para/>
/// NOTE: This was size() in Lucene.
/// </summary>
public int Count
@@ -1431,14 +1434,14 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Appends the provided <seealso cref="SegmentCommitInfo"/>. </summary>
+ /// Appends the provided <see cref="SegmentCommitInfo"/>. </summary>
public void Add(SegmentCommitInfo si)
{
segments.Add(si);
}
/// <summary>
- /// Appends the provided <seealso cref="SegmentCommitInfo"/>s. </summary>
+ /// Appends the provided <see cref="SegmentCommitInfo"/>s. </summary>
public void AddAll(IEnumerable<SegmentCommitInfo> sis)
{
foreach (var si in sis)
@@ -1448,16 +1451,16 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Clear all <seealso cref="SegmentCommitInfo"/>s. </summary>
+ /// Clear all <see cref="SegmentCommitInfo"/>s. </summary>
public void Clear()
{
segments.Clear();
}
/// <summary>
- /// Remove the provided <seealso cref="SegmentCommitInfo"/>.
+ /// Remove the provided <see cref="SegmentCommitInfo"/>.
///
- /// <p><b>WARNING</b>: O(N) cost
+ /// <para/><b>WARNING</b>: O(N) cost
/// </summary>
public void Remove(SegmentCommitInfo si)
{
@@ -1465,10 +1468,10 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Remove the <seealso cref="SegmentCommitInfo"/> at the
+ /// Remove the <see cref="SegmentCommitInfo"/> at the
/// provided index.
///
- /// <p><b>WARNING</b>: O(N) cost
+ /// <para/><b>WARNING</b>: O(N) cost
/// </summary>
internal void Remove(int index)
{
@@ -1476,10 +1479,10 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Return true if the provided {@link
- /// SegmentCommitInfo} is contained.
+ /// Return true if the provided
+ /// <see cref="SegmentCommitInfo"/> is contained.
///
- /// <p><b>WARNING</b>: O(N) cost
+ /// <para/><b>WARNING</b>: O(N) cost
/// </summary>
internal bool Contains(SegmentCommitInfo si)
{
@@ -1487,10 +1490,10 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Returns index of the provided {@link
- /// SegmentCommitInfo}.
+ /// Returns index of the provided
+ /// <see cref="SegmentCommitInfo"/>.
///
- /// <p><b>WARNING</b>: O(N) cost
+ /// <para/><b>WARNING</b>: O(N) cost
/// </summary>
internal int IndexOf(SegmentCommitInfo si)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/SegmentMerger.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentMerger.cs b/src/Lucene.Net/Index/SegmentMerger.cs
index fab5dee..57e1fa7 100644
--- a/src/Lucene.Net/Index/SegmentMerger.cs
+++ b/src/Lucene.Net/Index/SegmentMerger.cs
@@ -36,11 +36,11 @@ namespace Lucene.Net.Index
using TermVectorsWriter = Lucene.Net.Codecs.TermVectorsWriter;
/// <summary>
- /// The SegmentMerger class combines two or more Segments, represented by an
- /// IndexReader, into a single Segment. Call the merge method to combine the
+ /// The <see cref="SegmentMerger"/> class combines two or more Segments, represented by an
+ /// <see cref="IndexReader"/>, into a single Segment. Call the merge method to combine the
/// segments.
/// </summary>
- /// <seealso cref= #merge </seealso>
+ /// <seealso cref="Merge()"/>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
@@ -77,7 +77,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// True if any merging should happen </summary>
+ /// <c>True</c> if any merging should happen </summary>
internal bool ShouldMerge
{
get { return mergeState.SegmentInfo.DocCount > 0; }
@@ -87,7 +87,7 @@ namespace Lucene.Net.Index
/// Merges the readers into the directory passed to the constructor </summary>
/// <returns> The number of documents that were merged </returns>
/// <exception cref="CorruptIndexException"> if the index is corrupt </exception>
- /// <exception cref="IOException"> if there is a low-level IO error </exception>
+ /// <exception cref="System.IO.IOException"> if there is a low-level IO error </exception>
internal MergeState Merge()
{
if (!ShouldMerge)
@@ -381,7 +381,7 @@ namespace Lucene.Net.Index
///
/// <returns> The number of documents in all of the readers </returns>
/// <exception cref="CorruptIndexException"> if the index is corrupt </exception>
- /// <exception cref="IOException"> if there is a low-level IO error </exception>
+ /// <exception cref="System.IO.IOException"> if there is a low-level IO error </exception>
private int MergeFields()
{
StoredFieldsWriter fieldsWriter = codec.StoredFieldsFormat.FieldsWriter(directory, mergeState.SegmentInfo, context);
@@ -398,7 +398,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Merge the TermVectors from each of the segments into the new one. </summary>
- /// <exception cref="IOException"> if there is a low-level IO error </exception>
+ /// <exception cref="System.IO.IOException"> if there is a low-level IO error </exception>
private int MergeVectors()
{
TermVectorsWriter termVectorsWriter = codec.TermVectorsFormat.VectorsWriter(directory, mergeState.SegmentInfo, context);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/646db0ce/src/Lucene.Net/Index/SegmentReadState.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentReadState.cs b/src/Lucene.Net/Index/SegmentReadState.cs
index 3770649..e80e340 100644
--- a/src/Lucene.Net/Index/SegmentReadState.cs
+++ b/src/Lucene.Net/Index/SegmentReadState.cs
@@ -26,6 +26,7 @@ namespace Lucene.Net.Index
/// <summary>
/// Holder class for common parameters used during read.
+ /// <para/>
/// @lucene.experimental
/// </summary>
#if FEATURE_SERIALIZABLE
@@ -34,57 +35,57 @@ namespace Lucene.Net.Index
public class SegmentReadState
{
/// <summary>
- /// <seealso cref="Directory"/> where this segment is read from. </summary>
+ /// <see cref="Store.Directory"/> where this segment is read from. </summary>
public Directory Directory { get; private set; }
/// <summary>
- /// <seealso cref="SegmentInfo"/> describing this segment. </summary>
+ /// <see cref="Index.SegmentInfo"/> describing this segment. </summary>
public SegmentInfo SegmentInfo { get; private set; }
/// <summary>
- /// <seealso cref="FieldInfos"/> describing all fields in this
- /// segment.
+ /// <see cref="Index.FieldInfos"/> describing all fields in this
+ /// segment.
/// </summary>
public FieldInfos FieldInfos { get; private set; }
/// <summary>
- /// <seealso cref="IOContext"/> to pass to {@link
- /// Directory#openInput(String,IOContext)}.
+ /// <see cref="IOContext"/> to pass to
+ /// <see cref="Directory.OpenInput(string, IOContext)"/>.
/// </summary>
public IOContext Context { get; private set; }
/// <summary>
- /// The {@code termInfosIndexDivisor} to use, if
- /// appropriate (not all <seealso cref="PostingsFormat"/>s support
- /// it; in particular the current default does not).
+ /// The <c>termInfosIndexDivisor</c> to use, if
+ /// appropriate (not all <see cref="PostingsFormat"/>s support
+ /// it; in particular the current default does not).
///
- /// <p> NOTE: if this is < 0, that means "defer terms index
- /// load until needed". But if the codec must load the
- /// terms index on init (preflex is the only once currently
- /// that must do so), then it should negate this value to
- /// get the app's terms divisor
+ /// <para/> NOTE: if this is < 0, that means "defer terms index
+ /// load until needed". But if the codec must load the
+ /// terms index on init (preflex is the only once currently
+ /// that must do so), then it should negate this value to
+ /// get the app's terms divisor
/// </summary>
public int TermsIndexDivisor { get; set; }
/// <summary>
/// Unique suffix for any postings files read for this
- /// segment. <seealso cref="PerFieldPostingsFormat"/> sets this for
- /// each of the postings formats it wraps. If you create
- /// a new <seealso cref="PostingsFormat"/> then any files you
- /// write/read must be derived using this suffix (use
- /// <seealso cref="IndexFileNames#segmentFileName(String,String,String)"/>).
+ /// segment. <see cref="PerFieldPostingsFormat"/> sets this for
+ /// each of the postings formats it wraps. If you create
+ /// a new <see cref="PostingsFormat"/> then any files you
+ /// write/read must be derived using this suffix (use
+ /// <see cref="IndexFileNames.SegmentFileName(string, string, string)"/>).
/// </summary>
public string SegmentSuffix { get; private set; }
/// <summary>
- /// Create a {@code SegmentReadState}. </summary>
+ /// Create a <see cref="SegmentReadState"/>. </summary>
public SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, int termsIndexDivisor)
: this(dir, info, fieldInfos, context, termsIndexDivisor, "")
{
}
/// <summary>
- /// Create a {@code SegmentReadState}. </summary>
+ /// Create a <see cref="SegmentReadState"/>. </summary>
public SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, int termsIndexDivisor, string segmentSuffix)
{
this.Directory = dir;
@@ -96,7 +97,7 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// Create a {@code SegmentReadState}. </summary>
+ /// Create a <see cref="SegmentReadState"/>. </summary>
public SegmentReadState(SegmentReadState other, string newSegmentSuffix)
{
this.Directory = other.Directory;