Apache Lucene.Net 2.4.0 Class Library API

SegmentInfos Members

SegmentInfos overview

Public Static Fields

CURRENT_FORMAT 
FORMATThe file format version, a negative number.
FORMAT_CHECKSUM This format adds a checksum at the end of the file to ensure all bytes were successfully written.
FORMAT_DEL_COUNT This format adds the deletion count for each segment. This way IndexWriter can efficiently report numDocs().
FORMAT_HAS_PROX This format adds the boolean hasProx to record if any fields in the segment store prox information (ie, have omitTf==false)
FORMAT_LOCKLESSThis format adds details used for lockless commits. It differs slightly from the previous format in that file names are never re-used (write once). Instead, each file is written to the next generation. For example, segments_1, segments_2, etc. This allows us to not use a commit lock. See file formats for details.
FORMAT_SHARED_DOC_STOREThis format allows multiple segments to share a single vectors and stored fields file.
FORMAT_SINGLE_NORM_FILEThis format adds a "hasSingleNormFile" flag into each segment info. See LUCENE-756 for details.

Public Static Methods

GenerationFromSegmentsFileName Parse the generation off the segments file name and return it.
GetCurrentSegmentFileNameOverloaded. Get the filename of the current segments_N file from a list of files.
GetCurrentSegmentGenerationOverloaded. Get the generation (N) of the current segments_N file from a list of files.
GetDefaultGenFileRetryCount 
GetDefaultGenFileRetryPauseMsec 
GetDefaultGenLookahedCount 
GetInfoStream 
ReadCurrentVersion Current version number from segments file.
SetDefaultGenFileRetryCount Advanced: set how many times to try loading the segments.gen file contents to determine current segment generation. This file is only referenced when the primary method (listing the directory) fails.
SetDefaultGenFileRetryPauseMsec Advanced: set how many milliseconds to pause in between attempts to load the segments.gen file.
SetDefaultGenLookaheadCount 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.
SetInfoStreamIf non-null, information about retries when loading the segments file will be printed to this.

Public Instance Constructors

SegmentInfos Constructor Initializes a new instance of the SegmentInfos class.

Public Instance Fields

counter 

Public Instance Properties

Capacity (inherited from ArrayList)Gets or sets the number of elements that the ArrayList can contain.
Count (inherited from ArrayList)Gets the number of elements actually contained in the ArrayList.
IsFixedSize (inherited from ArrayList)Gets a value indicating whether the ArrayList has a fixed size.
IsReadOnly (inherited from ArrayList)Gets a value indicating whether the ArrayList is read-only.
IsSynchronized (inherited from ArrayList)Gets a value indicating whether access to the ArrayList is synchronized (thread safe).
Item (inherited from ArrayList)Gets or sets the element at the specified index.
SyncRoot (inherited from ArrayList)Gets an object that can be used to synchronize access to the ArrayList.

Public Instance Methods

Add (inherited from ArrayList)Adds an object to the end of the ArrayList.
AddRange (inherited from ArrayList)Adds the elements of an ICollection to the end of the ArrayList.
BinarySearch (inherited from ArrayList)Overloaded. Searches a range of elements in the sorted ArrayList for an element using the specified comparer and returns the zero-based index of the element.
Clear (inherited from ArrayList)Removes all elements from the ArrayList.
Clone Returns a copy of this instance, also copying each SegmentInfo.
Commit 
Contains (inherited from ArrayList)Determines whether an element is in the ArrayList.
CopyTo (inherited from ArrayList)Overloaded. Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array.
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
FinishCommit 
GetCurrentSegmentFileNameOverloaded. Get the segments_N filename in use by this segment infos.
GetEnumerator (inherited from ArrayList)Overloaded. Returns an enumerator for the entire ArrayList.
GetGeneration 
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetLastGeneration 
GetNextSegmentFileName Get the next segments_N filename that will be written.
GetRange (inherited from ArrayList)Returns an ArrayList which represents a subset of the elements in the source ArrayList.
GetType (inherited from Object)Gets the Type of the current instance.
GetVersion version number when this SegmentInfos was generated.
IndexOf (inherited from ArrayList)Overloaded. Searches for the specified Object and returns the zero-based index of the first occurrence within the entire ArrayList.
Info 
Insert (inherited from ArrayList)Inserts an element into the ArrayList at the specified index.
InsertRange (inherited from ArrayList)Inserts the elements of a collection into the ArrayList at the specified index.
LastIndexOf (inherited from ArrayList)Overloaded. Searches for the specified Object and returns the zero-based index of the last occurrence within the entire ArrayList.
PrepareCommit 
Range Returns a new SegmentInfos containg the SegmentInfo instances in the specified range first (inclusive) to last (exclusive), so total number of segments returned is last-first.
ReadOverloaded. Read a particular segmentFileName. Note that this may throw an IOException if a commit is in process.
Remove (inherited from ArrayList)Removes the first occurrence of a specific object from the ArrayList.
RemoveAt (inherited from ArrayList)Removes the element at the specified index of the ArrayList.
RemoveRange (inherited from ArrayList)Removes a range of elements from the ArrayList.
Reverse (inherited from ArrayList)Overloaded. Reverses the order of the elements in the entire ArrayList.
RollbackCommit 
SetRange (inherited from ArrayList)Copies the elements of a collection over a range of elements in the ArrayList.
Sort (inherited from ArrayList)Overloaded. Sorts the elements in the entire ArrayList using the IComparable implementation of each element.
ToArray (inherited from ArrayList)Overloaded. Copies the elements of the ArrayList to a new Object array.
ToString (inherited from Object)Returns a String that represents the current Object.
TrimToSize (inherited from ArrayList)Sets the capacity to the actual number of elements in the ArrayList.

See Also

SegmentInfos Class | Lucene.Net.Index Namespace