Example usage for Java org.apache.lucene.queries.mlt MoreLikeThis fields, constructors, methods, implement or subclass
The text is from its open source code.
int | DEFAULT_MAX_NUM_TOKENS_PARSED Default maximum number of tokens to parse in each example doc field that is not stored with TermVector support. |
int | DEFAULT_MIN_TERM_FREQ Ignore terms with less than this frequency in the source doc. |
int | DEFAULT_MIN_DOC_FREQ Ignore words which do not occur in at least this many docs. |
int | DEFAULT_MAX_DOC_FREQ Ignore words which occur in more than this many docs. |
int | DEFAULT_MIN_WORD_LENGTH Ignore words less than this length or if 0 then this has no effect. |
int | DEFAULT_MAX_WORD_LENGTH Ignore words greater than this length or if 0 then this has no effect. |
int | DEFAULT_MAX_QUERY_TERMS Return a Query with no more than this many terms. |
MoreLikeThis(IndexReader ir) Constructor requiring an IndexReader. | |
MoreLikeThis(IndexReader ir, TFIDFSimilarity sim) |
String[] | getFieldNames() Returns the field names that will be used when generating the 'More Like This' query. |
Query | like(int docNum) Return a query that will return docs like the passed lucene document ID. |
Query | like(Map |
Query | like(String fieldName, Reader... readers) Return a query that will return docs like the passed Readers. |
String[] | retrieveInterestingTerms(int docNum) |
void | setAnalyzer(Analyzer analyzer) Sets the analyzer to use. |
void | setBoost(boolean boost) Sets whether to boost terms in query based on "score" or not. |
void | setBoostFactor(float boostFactor) Sets the boost factor to use when boosting terms |
void | setFieldNames(String[] fieldNames) Sets the field names that will be used when generating the 'More Like This' query. |
void | setMaxDocFreq(int maxFreq) Set the maximum frequency in which words may still appear. |
void | setMaxDocFreqPct(int maxPercentage) Set the maximum percentage in which words may still appear. |
void | setMaxNumTokensParsed(int i) |
void | setMaxQueryTerms(int maxQueryTerms) Sets the maximum number of query terms that will be included in any generated query. |
void | setMaxWordLen(int maxWordLen) Sets the maximum word length above which words will be ignored. |
void | setMinDocFreq(int minDocFreq) Sets the frequency at which words will be ignored which do not occur in at least this many docs. |
void | setMinTermFreq(int minTermFreq) Sets the frequency below which terms will be ignored in the source doc. |
void | setMinWordLen(int minWordLen) Sets the minimum word length below which words will be ignored. |
void | setStopWords(Set> stopWords) Set the set of stopwords. |