org.compass.core
Interface CompassQueryBuilder.CompassMoreLikeThisQuery

All Superinterfaces:
CompassQueryBuilder.ToCompassQuery
All Known Implementing Classes:
DefaultCompassQueryBuilder.DefaultCompassMoreLikeThisQuery
Enclosing interface:
CompassQueryBuilder

public static interface CompassQueryBuilder.CompassMoreLikeThisQuery
extends CompassQueryBuilder.ToCompassQuery

A more like this query builder (maps to Lucene MoreLikeThis feature withing the contrib queries package).


Method Summary
 CompassQueryBuilder.CompassMoreLikeThisQuery addProperty(String property)
          Adds a property to the more like this query will be performed on.
 CompassQueryBuilder.CompassMoreLikeThisQuery setAliases(String[] aliases)
          Sets the aliases that "more liket this" hits will be searched on
 CompassQueryBuilder.CompassMoreLikeThisQuery setAnalyzer(String analyzer)
          Sets the analyzer that will be used to analyze a more like this string (used when using CompassQueryBuilder.moreLikeThis(java.io.Reader).
 CompassQueryBuilder.CompassMoreLikeThisQuery setBoost(boolean boost)
          Sets whether to boost terms in query based on "score" or not.
 CompassQueryBuilder.CompassMoreLikeThisQuery setMaxNumTokensParsed(int maxNumTokensParsed)
          The maximum number of tokens to parse in each example doc field that is not stored with TermVector support
 CompassQueryBuilder.CompassMoreLikeThisQuery setMaxQueryTerms(int maxQueryTerms)
          Sets the maximum number of query terms that will be included in any generated query.
 CompassQueryBuilder.CompassMoreLikeThisQuery setMaxWordLen(int maxWordLen)
          Sets the maximum word length above which words will be ignored.
 CompassQueryBuilder.CompassMoreLikeThisQuery setMinResourceFreq(int minDocFreq)
          Sets the frequency at which words will be ignored which do not occur in at least this many resources.
 CompassQueryBuilder.CompassMoreLikeThisQuery setMinTermFreq(int minTermFreq)
          Sets the frequency below which terms will be ignored in the source doc.
 CompassQueryBuilder.CompassMoreLikeThisQuery setMinWordLen(int minWordLen)
          Sets the minimum word length below which words will be ignored.
 CompassQueryBuilder.CompassMoreLikeThisQuery setProperties(String[] properties)
          Sets properties to the more like this query will be performed on.
 CompassQueryBuilder.CompassMoreLikeThisQuery setStopWords(String[] stopWords)
          Set the set of stopwords.
 CompassQueryBuilder.CompassMoreLikeThisQuery setSubIndexes(String[] subIndexes)
          Sets the sub indexes that "more liket this" hits will be searched on
 
Methods inherited from interface org.compass.core.CompassQueryBuilder.ToCompassQuery
toQuery
 

Method Detail

setSubIndexes

CompassQueryBuilder.CompassMoreLikeThisQuery setSubIndexes(String[] subIndexes)
Sets the sub indexes that "more liket this" hits will be searched on


setAliases

CompassQueryBuilder.CompassMoreLikeThisQuery setAliases(String[] aliases)
Sets the aliases that "more liket this" hits will be searched on


setProperties

CompassQueryBuilder.CompassMoreLikeThisQuery setProperties(String[] properties)
Sets properties to the more like this query will be performed on.


addProperty

CompassQueryBuilder.CompassMoreLikeThisQuery addProperty(String property)
Adds a property to the more like this query will be performed on.


setAnalyzer

CompassQueryBuilder.CompassMoreLikeThisQuery setAnalyzer(String analyzer)
Sets the analyzer that will be used to analyze a more like this string (used when using CompassQueryBuilder.moreLikeThis(java.io.Reader).


setBoost

CompassQueryBuilder.CompassMoreLikeThisQuery setBoost(boolean boost)
Sets whether to boost terms in query based on "score" or not.


setMaxNumTokensParsed

CompassQueryBuilder.CompassMoreLikeThisQuery setMaxNumTokensParsed(int maxNumTokensParsed)
The maximum number of tokens to parse in each example doc field that is not stored with TermVector support


setMaxQueryTerms

CompassQueryBuilder.CompassMoreLikeThisQuery setMaxQueryTerms(int maxQueryTerms)
Sets the maximum number of query terms that will be included in any generated query.


setMaxWordLen

CompassQueryBuilder.CompassMoreLikeThisQuery setMaxWordLen(int maxWordLen)
Sets the maximum word length above which words will be ignored. Set this to 0 for no maximum word length. The default is 0.


setMinWordLen

CompassQueryBuilder.CompassMoreLikeThisQuery setMinWordLen(int minWordLen)
Sets the minimum word length below which words will be ignored. Set this to 0 for no minimum word length. The default is 0.


setMinResourceFreq

CompassQueryBuilder.CompassMoreLikeThisQuery setMinResourceFreq(int minDocFreq)
Sets the frequency at which words will be ignored which do not occur in at least this many resources. Defaults to 5.


setMinTermFreq

CompassQueryBuilder.CompassMoreLikeThisQuery setMinTermFreq(int minTermFreq)
Sets the frequency below which terms will be ignored in the source doc. Defaults to 2.


setStopWords

CompassQueryBuilder.CompassMoreLikeThisQuery setStopWords(String[] stopWords)
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".



Copyright (c) 2004-2009 The Compass Project.