org.compass.core.impl
Class DefaultCompassQueryBuilder.DefaultCompassMoreLikeThisQuery

java.lang.Object
  extended by org.compass.core.impl.DefaultCompassQueryBuilder.DefaultCompassMoreLikeThisQuery
All Implemented Interfaces:
CompassQueryBuilder.CompassMoreLikeThisQuery, CompassQueryBuilder.ToCompassQuery
Enclosing class:
DefaultCompassQueryBuilder

public class DefaultCompassQueryBuilder.DefaultCompassMoreLikeThisQuery
extends Object
implements CompassQueryBuilder.CompassMoreLikeThisQuery


Constructor Summary
DefaultCompassQueryBuilder.DefaultCompassMoreLikeThisQuery(SearchEngineQueryBuilder.SearchEngineMoreLikeThisQueryBuilder queryBuilder, InternalCompassSession session)
           
 
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
 CompassQuery toQuery()
          Create the query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCompassQueryBuilder.DefaultCompassMoreLikeThisQuery

public DefaultCompassQueryBuilder.DefaultCompassMoreLikeThisQuery(SearchEngineQueryBuilder.SearchEngineMoreLikeThisQueryBuilder queryBuilder,
                                                                  InternalCompassSession session)
Method Detail

setSubIndexes

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

Specified by:
setSubIndexes in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setAliases

public CompassQueryBuilder.CompassMoreLikeThisQuery setAliases(String[] aliases)
Description copied from interface: CompassQueryBuilder.CompassMoreLikeThisQuery
Sets the aliases that "more liket this" hits will be searched on

Specified by:
setAliases in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setProperties

public CompassQueryBuilder.CompassMoreLikeThisQuery setProperties(String[] properties)
Description copied from interface: CompassQueryBuilder.CompassMoreLikeThisQuery
Sets properties to the more like this query will be performed on.

Specified by:
setProperties in interface CompassQueryBuilder.CompassMoreLikeThisQuery

addProperty

public CompassQueryBuilder.CompassMoreLikeThisQuery addProperty(String property)
Description copied from interface: CompassQueryBuilder.CompassMoreLikeThisQuery
Adds a property to the more like this query will be performed on.

Specified by:
addProperty in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setAnalyzer

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

Specified by:
setAnalyzer in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setBoost

public CompassQueryBuilder.CompassMoreLikeThisQuery setBoost(boolean boost)
Description copied from interface: CompassQueryBuilder.CompassMoreLikeThisQuery
Sets whether to boost terms in query based on "score" or not.

Specified by:
setBoost in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setMaxNumTokensParsed

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

Specified by:
setMaxNumTokensParsed in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setMaxQueryTerms

public CompassQueryBuilder.CompassMoreLikeThisQuery setMaxQueryTerms(int maxQueryTerms)
Description copied from interface: CompassQueryBuilder.CompassMoreLikeThisQuery
Sets the maximum number of query terms that will be included in any generated query.

Specified by:
setMaxQueryTerms in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setMaxWordLen

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

Specified by:
setMaxWordLen in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setMinWordLen

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

Specified by:
setMinWordLen in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setMinResourceFreq

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

Specified by:
setMinResourceFreq in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setMinTermFreq

public CompassQueryBuilder.CompassMoreLikeThisQuery setMinTermFreq(int minTermFreq)
Description copied from interface: CompassQueryBuilder.CompassMoreLikeThisQuery
Sets the frequency below which terms will be ignored in the source doc. Defaults to 2.

Specified by:
setMinTermFreq in interface CompassQueryBuilder.CompassMoreLikeThisQuery

setStopWords

public CompassQueryBuilder.CompassMoreLikeThisQuery setStopWords(String[] stopWords)
Description copied from interface: CompassQueryBuilder.CompassMoreLikeThisQuery
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".

Specified by:
setStopWords in interface CompassQueryBuilder.CompassMoreLikeThisQuery

toQuery

public CompassQuery toQuery()
Description copied from interface: CompassQueryBuilder.ToCompassQuery
Create the query.

Specified by:
toQuery in interface CompassQueryBuilder.ToCompassQuery


Copyright (c) 2004-2008 The Compass Project.