C# Class Rubber.DSL.Query.MoreLikeThisFieldQueryBuilder

A more like this query that runs against a specific field.
Inheritance: IQueryBuilder
显示文件 Open project: stephenpope/Rubber

Public Methods

Method Description
Analyzer ( String analyzer ) : MoreLikeThisFieldQueryBuilder

The analyzer that will be used to analyze the text. Defaults to the analyzer associated with the fied.

Boost ( float boost ) : MoreLikeThisFieldQueryBuilder
BoostTerms ( float boostTerms ) : MoreLikeThisFieldQueryBuilder

Sets the boost factor to use when boosting terms. Defaults to 1.

LikeText ( string likeText ) : MoreLikeThisFieldQueryBuilder

The text to use in order to find documents that are "like" this.

MaxDocFreq ( int maxDocFreq ) : MoreLikeThisFieldQueryBuilder

Set the maximum frequency in which words may still appear. Words that appear in more than this many docs will be ignored. Defaults to unbounded.

MaxQueryTerms ( int maxQueryTerms ) : MoreLikeThisFieldQueryBuilder

Sets the maximum number of query terms that will be included in any generated query. Defaults to 25.

MaxWordLen ( int maxWordLen ) : MoreLikeThisFieldQueryBuilder

Sets the maximum word length above which words will be ignored. Defaults to unbounded (0).

MinDocFreq ( int minDocFreq ) : MoreLikeThisFieldQueryBuilder

Sets the frequency at which words will be ignored which do not occur in at least this many docs. Defaults to 5.

MinTermFreq ( int minTermFreqy ) : MoreLikeThisFieldQueryBuilder

The frequency below which terms will be ignored in the source doc. The default frequency is 2.

MinWordLen ( int minWordLen ) : MoreLikeThisFieldQueryBuilder

Sets the minimum word length below which words will be ignored. Defaults to 0.

MoreLikeThisFieldQueryBuilder ( string name ) : System

A more like this query that runs against a specific field.

PercentTermsToMatch ( float percentTermsToMatch ) : MoreLikeThisFieldQueryBuilder

The percentage of terms to match. Defaults to 0.3.

StopWords ( ) : MoreLikeThisFieldQueryBuilder

Set the set of stopwords.

Any word in this set is considered "uninteresting" and ignored. Even if your Analyzer allows stopwords, you might want to tell the MoreLikeThis code to ignore them, as for the purposes of document similarity it seems reasonable to assume that "a stop word is never interesting".

ToJsonObject ( ) : object
ToString ( ) : string

Method Details

Analyzer() public method

The analyzer that will be used to analyze the text. Defaults to the analyzer associated with the fied.
public Analyzer ( String analyzer ) : MoreLikeThisFieldQueryBuilder
analyzer String
return MoreLikeThisFieldQueryBuilder

Boost() public method

public Boost ( float boost ) : MoreLikeThisFieldQueryBuilder
boost float
return MoreLikeThisFieldQueryBuilder

BoostTerms() public method

Sets the boost factor to use when boosting terms. Defaults to 1.
public BoostTerms ( float boostTerms ) : MoreLikeThisFieldQueryBuilder
boostTerms float
return MoreLikeThisFieldQueryBuilder

LikeText() public method

The text to use in order to find documents that are "like" this.
public LikeText ( string likeText ) : MoreLikeThisFieldQueryBuilder
likeText string
return MoreLikeThisFieldQueryBuilder

MaxDocFreq() public method

Set the maximum frequency in which words may still appear. Words that appear in more than this many docs will be ignored. Defaults to unbounded.
public MaxDocFreq ( int maxDocFreq ) : MoreLikeThisFieldQueryBuilder
maxDocFreq int
return MoreLikeThisFieldQueryBuilder

MaxQueryTerms() public method

Sets the maximum number of query terms that will be included in any generated query. Defaults to 25.
public MaxQueryTerms ( int maxQueryTerms ) : MoreLikeThisFieldQueryBuilder
maxQueryTerms int
return MoreLikeThisFieldQueryBuilder

MaxWordLen() public method

Sets the maximum word length above which words will be ignored. Defaults to unbounded (0).
public MaxWordLen ( int maxWordLen ) : MoreLikeThisFieldQueryBuilder
maxWordLen int
return MoreLikeThisFieldQueryBuilder

MinDocFreq() public method

Sets the frequency at which words will be ignored which do not occur in at least this many docs. Defaults to 5.
public MinDocFreq ( int minDocFreq ) : MoreLikeThisFieldQueryBuilder
minDocFreq int
return MoreLikeThisFieldQueryBuilder

MinTermFreq() public method

The frequency below which terms will be ignored in the source doc. The default frequency is 2.
public MinTermFreq ( int minTermFreqy ) : MoreLikeThisFieldQueryBuilder
minTermFreqy int
return MoreLikeThisFieldQueryBuilder

MinWordLen() public method

Sets the minimum word length below which words will be ignored. Defaults to 0.
public MinWordLen ( int minWordLen ) : MoreLikeThisFieldQueryBuilder
minWordLen int
return MoreLikeThisFieldQueryBuilder

MoreLikeThisFieldQueryBuilder() public method

A more like this query that runs against a specific field.
public MoreLikeThisFieldQueryBuilder ( string name ) : System
name string The field name to run the query against
return System

PercentTermsToMatch() public method

The percentage of terms to match. Defaults to 0.3.
public PercentTermsToMatch ( float percentTermsToMatch ) : MoreLikeThisFieldQueryBuilder
percentTermsToMatch float
return MoreLikeThisFieldQueryBuilder

StopWords() public method

Set the set of stopwords.

Any word in this set is considered "uninteresting" and ignored. Even if your Analyzer allows stopwords, you might want to tell the MoreLikeThis code to ignore them, as for the purposes of document similarity it seems reasonable to assume that "a stop word is never interesting".

public StopWords ( ) : MoreLikeThisFieldQueryBuilder
return MoreLikeThisFieldQueryBuilder

ToJsonObject() public method

public ToJsonObject ( ) : object
return object

ToString() public method

public ToString ( ) : string
return string