Package org.terrier.querying.parser
Class DisjunctiveQuery
- java.lang.Object
-
- org.terrier.querying.parser.Query
-
- org.terrier.querying.parser.MultiTermQuery
-
- org.terrier.querying.parser.DisjunctiveQuery
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class DisjunctiveQuery extends MultiTermQuery
Models a disjunctive choice in single term queries in a query.- Author:
- Craig Macdonald
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.terrier.querying.parser.Query
Query.ForEachQueryNode, Query.QTPBuilder, Query.QueryTermsParameter
-
-
Constructor Summary
Constructors Constructor Description DisjunctiveQuery()default constructorDisjunctiveQuery(java.lang.String[] alternatives)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetWeight()Returns the weight of the disjunctive "term".voidobtainAllOf(java.lang.Class<? extends Query> c, java.util.List<Query> a)Returns all the queries of the specified classvoidobtainQueryTerms(MatchingQueryTerms terms, java.lang.String field, java.lang.Boolean required, java.lang.Double weight)voidobtainQueryTerms(Query.QueryTermsParameter parameters)voidresetActive()reset active indexvoidsetActive(int _activeIndex)set active indexvoidsetWeight(double w)Sets the weight of the disjunctive "term".java.lang.StringtoString()Returns a string representation of the query.-
Methods inherited from class org.terrier.querying.parser.MultiTermQuery
add, add, apply, applyTermPipeline, clone, getNumberOfTerms, getTerms, getTermsOf, obtainControls, parseTree, replace
-
-
-
-
Method Detail
-
setWeight
public void setWeight(double w)
Sets the weight of the disjunctive "term".- Overrides:
setWeightin classMultiTermQuery- Parameters:
w- double the weight of the disjunctive "term".
-
getWeight
public double getWeight()
Returns the weight of the disjunctive "term".- Returns:
- double the weight of the disjunctive "term".
-
resetActive
public void resetActive()
reset active index
-
setActive
public void setActive(int _activeIndex)
set active index- Parameters:
_activeIndex-
-
obtainQueryTerms
public void obtainQueryTerms(MatchingQueryTerms terms, java.lang.String field, java.lang.Boolean required, java.lang.Double weight)
- Overrides:
obtainQueryTermsin classMultiTermQuery
-
obtainQueryTerms
public void obtainQueryTerms(Query.QueryTermsParameter parameters)
- Overrides:
obtainQueryTermsin classMultiTermQuery
-
obtainAllOf
public void obtainAllOf(java.lang.Class<? extends Query> c, java.util.List<Query> a)
Description copied from class:QueryReturns all the queries of the specified class- Overrides:
obtainAllOfin classMultiTermQuery
-
toString
public java.lang.String toString()
Description copied from class:MultiTermQueryReturns a string representation of the query.- Overrides:
toStringin classMultiTermQuery- Returns:
- String the string of this query.
-
-