C# Class Lucene.Net.Search.Query

Inheritance: System.ICloneable
Show file Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
Clone ( ) : object

Returns a clone of this query.

CreateWeight ( IndexSearcher searcher ) : Weight

Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Equals ( object obj ) : bool
ExtractTerms ( ISet terms ) : void

Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its #rewrite rewritten form.

GetHashCode ( ) : int
Rewrite ( IndexReader reader ) : Query

Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

ToString ( ) : string

Prints a query to a string.

ToString ( string field ) : string

Prints a query to a string, with field assumed to be the default field and omitted.

Method Details

Clone() public method

Returns a clone of this query.
public Clone ( ) : object
return object

CreateWeight() public method

Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

public CreateWeight ( IndexSearcher searcher ) : Weight
searcher IndexSearcher
return Weight

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

ExtractTerms() public method

Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its #rewrite rewritten form.
if this query is not yet rewritten
public ExtractTerms ( ISet terms ) : void
terms ISet
return void

GetHashCode() public method

public GetHashCode ( ) : int
return int

Rewrite() public method

Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.
public Rewrite ( IndexReader reader ) : Query
reader IndexReader
return Query

ToString() public method

Prints a query to a string.
public ToString ( ) : string
return string

ToString() public abstract method

Prints a query to a string, with field assumed to be the default field and omitted.
public abstract ToString ( string field ) : string
field string
return string