C# Class Lucene.Net.Search.FuzzyTermsEnum

Subclass of TermsEnum for enumerating all terms that are similar to the specified filter term.

Term enumerations are always ordered by #getComparator. Each term in the enumeration is greater than all that precede it.

Inheritance: TermsEnum
显示文件 Open project: paulirwin/lucene.net Class Usage Examples

Protected Properties

Property Type Description
MaxEdits int
MinSimilarity_Renamed float
Raw bool
RealPrefixLength int
Scale_factor float
TermLength int
TermText int[]
Terms Terms

Public Methods

Method Description
DocFreq ( ) : int
Docs ( Bits liveDocs, DocsEnum reuse, int flags ) : DocsEnum
DocsAndPositions ( Bits liveDocs, DocsAndPositionsEnum reuse, int flags ) : DocsAndPositionsEnum
FuzzyTermsEnum ( Terms terms, Lucene.Net.Util.AttributeSource atts, Term term, float minSimilarity, int prefixLength, bool transpositions ) : System

Constructor for enumeration of all terms from specified reader which share a prefix of length prefixLength with term and which have a fuzzy similarity > minSimilarity.

After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

Next ( ) : BytesRef
Ord ( ) : long
SeekCeil ( BytesRef text ) : SeekStatus
SeekExact ( BytesRef text ) : bool
SeekExact ( BytesRef term, TermState state ) : void
SeekExact ( long ord ) : void
Term ( ) : BytesRef
TermState ( ) : TermState
TotalTermFreq ( ) : long

Protected Methods

Method Description
GetAutomatonEnum ( int editDistance, BytesRef lastTerm ) : TermsEnum

return an automata-based enum for matching up to editDistance from lastTerm, if possible

MaxEditDistanceChanged ( BytesRef lastTerm, int maxEdits, bool init ) : void

Private Methods

Method Description
BottomChanged ( BytesRef lastTerm, bool init ) : void

fired when the max non-competitive boost has changed. this is the hook to swap in a smarter actualEnum

CalculateMaxBoost ( int nEdits ) : float
InitAutomata ( int maxDistance ) : IList

initialize levenshtein DFAs up to maxDistance, if possible

InitialMaxDistance ( float minimumSimilarity, int termLen ) : int
InitializeInstanceFields ( ) : void

Method Details

DocFreq() public method

public DocFreq ( ) : int
return int

Docs() public method

public Docs ( Bits liveDocs, DocsEnum reuse, int flags ) : DocsEnum
liveDocs Bits
reuse DocsEnum
flags int
return DocsEnum

DocsAndPositions() public method

public DocsAndPositions ( Bits liveDocs, DocsAndPositionsEnum reuse, int flags ) : DocsAndPositionsEnum
liveDocs Bits
reuse DocsAndPositionsEnum
flags int
return DocsAndPositionsEnum

FuzzyTermsEnum() public method

Constructor for enumeration of all terms from specified reader which share a prefix of length prefixLength with term and which have a fuzzy similarity > minSimilarity.

After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

if there is a low-level IO error
public FuzzyTermsEnum ( Terms terms, Lucene.Net.Util.AttributeSource atts, Term term, float minSimilarity, int prefixLength, bool transpositions ) : System
terms Terms Delivers terms.
atts Lucene.Net.Util.AttributeSource created by the rewrite method of /// thats contains information about competitive boosts during rewrite. It is also used /// to cache DFAs between segment transitions.
term Term Pattern term.
minSimilarity float Minimum required similarity for terms from the reader. Pass an integer value /// representing edit distance. Passing a fraction is deprecated.
prefixLength int Length of required common prefix. Default value is 0.
transpositions bool
return System

GetAutomatonEnum() protected method

return an automata-based enum for matching up to editDistance from lastTerm, if possible
protected GetAutomatonEnum ( int editDistance, BytesRef lastTerm ) : TermsEnum
editDistance int
lastTerm BytesRef
return TermsEnum

MaxEditDistanceChanged() protected method

protected MaxEditDistanceChanged ( BytesRef lastTerm, int maxEdits, bool init ) : void
lastTerm BytesRef
maxEdits int
init bool
return void

Next() public method

public Next ( ) : BytesRef
return BytesRef

Ord() public method

public Ord ( ) : long
return long

SeekCeil() public method

public SeekCeil ( BytesRef text ) : SeekStatus
text BytesRef
return SeekStatus

SeekExact() public method

public SeekExact ( BytesRef text ) : bool
text BytesRef
return bool

SeekExact() public method

public SeekExact ( BytesRef term, TermState state ) : void
term BytesRef
state TermState
return void

SeekExact() public method

public SeekExact ( long ord ) : void
ord long
return void

Term() public method

public Term ( ) : BytesRef
return BytesRef

TermState() public method

public TermState ( ) : TermState
return TermState

TotalTermFreq() public method

public TotalTermFreq ( ) : long
return long

Property Details

MaxEdits protected_oe property

protected int MaxEdits
return int

MinSimilarity_Renamed protected_oe property

protected float MinSimilarity_Renamed
return float

Raw protected_oe property

protected bool Raw
return bool

RealPrefixLength protected_oe property

protected int RealPrefixLength
return int

Scale_factor protected_oe property

protected float Scale_factor
return float

TermLength protected_oe property

protected int TermLength
return int

TermText protected_oe property

protected int[] TermText
return int[]

Terms protected_oe property

protected Terms Terms
return Terms