C# Class Lucene.Net.Index.SegmentInfo

Information about a segment such as it's name, directory, and files related to the segment. *

NOTE: This API is new and still experimental (subject to change suddenly in the next release)

Inheritance: System.ICloneable
显示文件 Open project: apache/lucenenet Class Usage Examples

Public Properties

Property Type Description
Dir Directory
Name string

Public Methods

Method Description
AddFile ( string file ) : void

Add this file to the set of files written for this segment.

AddFiles ( ICollection files ) : void

Add these files to the set of files written for this segment.

Equals ( object obj ) : bool

We consider another SegmentInfo instance equal if it has the same dir and same name.

GetHashCode ( ) : int
SegmentInfo ( Directory dir, string version, string name, int docCount, bool isCompoundFile, Codec codec, string>.IDictionary diagnostics ) : System

Construct a new complete SegmentInfo instance from input.

Note: this is public only to allow access from the codecs package.

SegmentInfo ( Directory dir, string version, string name, int docCount, bool isCompoundFile, Codec codec, string>.IDictionary diagnostics, string>.IDictionary attributes ) : System

Construct a new complete SegmentInfo instance from input.

Note: this is public only to allow access from the codecs package.

ToString ( ) : string

Return all files referenced by this SegmentInfo.

ToString ( Directory dir, int delCount ) : string

Used for debugging. Format may suddenly change.

Current format looks like _a(3.1):c45/4, which means the segment's name is _a; it was created with Lucene 3.1 (or '?' if it's unknown); it's using compound file format (would be C if not compound); it has 45 documents; it has 4 deletions (this part is left off when there are no deletions).

Private Methods

Method Description
Attributes ( ) : string>.IDictionary
CheckFileNames ( ICollection files ) : void
GetAttribute ( string key ) : string
HasSeparateNorms ( ) : bool
PutAttribute ( string key, string value ) : string

Method Details

AddFile() public method

Add this file to the set of files written for this segment.
public AddFile ( string file ) : void
file string
return void

AddFiles() public method

Add these files to the set of files written for this segment.
public AddFiles ( ICollection files ) : void
files ICollection
return void

Equals() public method

We consider another SegmentInfo instance equal if it has the same dir and same name.
public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

SegmentInfo() public method

Construct a new complete SegmentInfo instance from input.

Note: this is public only to allow access from the codecs package.

public SegmentInfo ( Directory dir, string version, string name, int docCount, bool isCompoundFile, Codec codec, string>.IDictionary diagnostics ) : System
dir Directory
version string
name string
docCount int
isCompoundFile bool
codec Codec
diagnostics string>.IDictionary
return System

SegmentInfo() public method

Construct a new complete SegmentInfo instance from input.

Note: this is public only to allow access from the codecs package.

public SegmentInfo ( Directory dir, string version, string name, int docCount, bool isCompoundFile, Codec codec, string>.IDictionary diagnostics, string>.IDictionary attributes ) : System
dir Directory
version string
name string
docCount int
isCompoundFile bool
codec Codec
diagnostics string>.IDictionary
attributes string>.IDictionary
return System

ToString() public method

Return all files referenced by this SegmentInfo.
public ToString ( ) : string
return string

ToString() public method

Used for debugging. Format may suddenly change.

Current format looks like _a(3.1):c45/4, which means the segment's name is _a; it was created with Lucene 3.1 (or '?' if it's unknown); it's using compound file format (would be C if not compound); it has 45 documents; it has 4 deletions (this part is left off when there are no deletions).

public ToString ( Directory dir, int delCount ) : string
dir Directory
delCount int
return string

Property Details

Dir public_oe property

Where this segment resides.
public Directory Dir
return Directory

Name public_oe property

Unique segment name in the directory.
public string Name
return string