Module
MoreLikeThisFieldQuery
MoreLikeThisFieldQuery ( field, likeText )
Constructs a query where each documents returned are “like” provided text
|
Method Summary
Returns | Name | Description |
---|---|---|
String | _type() | The type of ejs object. For internal use only. |
Object | analyzer(analyzerName) | The analyzer that will be used to analyze the text. Defaults to the analyzer associated with the field. |
Object | boost(boost) | Sets the boost value of the Query . |
Object | boostTerms(boost) | Sets the boost factor to use when boosting terms. Defaults to 1. |
Object | failOnUnsupportedField(trueFalse) | Should the Query fail when an unsupported field
is specified. Defaults to true. |
Object | field(f) | The field to run the query against. |
Object | likeText(s) | The text to find documents like |
Object | maxDocFreq(max) | The maximum frequency in which words may still appear. Words that appear in more than this many docs will be ignored. Defaults to unbounded. |
Object | maxQueryTerms(max) | The maximum number of query terms that will be included in any generated query. Defaults to 25. |
Object | maxWordLen(len) | The maximum word length above which words will be ignored. Defaults to unbounded (0). |
Object | minDocFreq(min) | The frequency at which words will be ignored which do not occur in at least this many docs. Defaults to 5. |
Object | minTermFreq(freq) | The frequency below which terms will be ignored in the source doc. The default frequency is 2. |
Object | minWordLen(len) | The minimum word length below which words will be ignored. Defaults to 0. |
Object | percentTermsToMatch(percent) | The percentage of terms to match on (float value). Defaults to 0.3 (30 percent). |
Object | stopWords(stopWords) | An array of stop words. 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”. |
String | toJSON() | Retrieves the internal query object. This is typically used by
internal API functions so use with caution. |
Method Detail
analyzer
Object analyzer ( analyzerName )
The analyzer that will be used to analyze the text. Defaults to the
analyzer associated with the field.
|
boost
Object boost ( boost )
Sets the boost value of the Query .
|
boostTerms
Object boostTerms ( boost )
Sets the boost factor to use when boosting terms.
Defaults to 1.
|
failOnUnsupportedField
Object failOnUnsupportedField ( trueFalse )
Should the Query fail when an unsupported field
is specified. Defaults to true.
|
field
Object field ( f )
The field to run the query against.
|
likeText
Object likeText ( s )
The text to find documents like
|
maxDocFreq
Object maxDocFreq ( max )
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
Object maxQueryTerms ( max )
The maximum number of query terms that will be included in any
generated query. Defaults to 25.
|
maxWordLen
Object maxWordLen ( len )
The maximum word length above which words will be ignored.
Defaults to unbounded (0).
|
minDocFreq
Object minDocFreq ( min )
The frequency at which words will be ignored which do not occur in
at least this many docs. Defaults to 5.
|
minTermFreq
Object minTermFreq ( freq )
The frequency below which terms will be ignored in the source doc.
The default frequency is 2.
|
minWordLen
Object minWordLen ( len )
The minimum word length below which words will be ignored.
Defaults to 0.
|
percentTermsToMatch
Object percentTermsToMatch ( percent )
The percentage of terms to match on (float value).
Defaults to 0.3 (30 percent).
|
stopWords
Object stopWords ( stopWords )
An array of stop words. 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”.
|
toJSON
String toJSON ( )
Retrieves the internal query object. This is typically used by
internal API functions so use with caution.
|