Java org.apache.lucene.queries.mlt MoreLikeThis fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.queries.mlt MoreLikeThis fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.queries.mlt MoreLikeThis.

The text is from its open source code.

Field

intDEFAULT_MAX_NUM_TOKENS_PARSED
Default maximum number of tokens to parse in each example doc field that is not stored with TermVector support.
intDEFAULT_MIN_TERM_FREQ
Ignore terms with less than this frequency in the source doc.
intDEFAULT_MIN_DOC_FREQ
Ignore words which do not occur in at least this many docs.
intDEFAULT_MAX_DOC_FREQ
Ignore words which occur in more than this many docs.
intDEFAULT_MIN_WORD_LENGTH
Ignore words less than this length or if 0 then this has no effect.
intDEFAULT_MAX_WORD_LENGTH
Ignore words greater than this length or if 0 then this has no effect.
intDEFAULT_MAX_QUERY_TERMS
Return a Query with no more than this many terms.

Constructor

Method

String[]getFieldNames()
Returns the field names that will be used when generating the 'More Like This' query.
Querylike(int docNum)
Return a query that will return docs like the passed lucene document ID.
Querylike(Map> filteredDocument)
Querylike(String fieldName, Reader... readers)
Return a query that will return docs like the passed Readers.
String[]retrieveInterestingTerms(int docNum)
voidsetAnalyzer(Analyzer analyzer)
Sets the analyzer to use.
voidsetBoost(boolean boost)
Sets whether to boost terms in query based on "score" or not.
voidsetBoostFactor(float boostFactor)
Sets the boost factor to use when boosting terms
voidsetFieldNames(String[] fieldNames)
Sets the field names that will be used when generating the 'More Like This' query.
voidsetMaxDocFreq(int maxFreq)
Set the maximum frequency in which words may still appear.
voidsetMaxDocFreqPct(int maxPercentage)
Set the maximum percentage in which words may still appear.
voidsetMaxNumTokensParsed(int i)
voidsetMaxQueryTerms(int maxQueryTerms)
Sets the maximum number of query terms that will be included in any generated query.
voidsetMaxWordLen(int maxWordLen)
Sets the maximum word length above which words will be ignored.
voidsetMinDocFreq(int minDocFreq)
Sets the frequency at which words will be ignored which do not occur in at least this many docs.
voidsetMinTermFreq(int minTermFreq)
Sets the frequency below which terms will be ignored in the source doc.
voidsetMinWordLen(int minWordLen)
Sets the minimum word length below which words will be ignored.
voidsetStopWords(Set stopWords)
Set the set of stopwords.