Package com.yahoo.search.predicate
Class PredicateQuery
- java.lang.Object
-
- com.yahoo.search.predicate.PredicateQuery
-
@Beta public class PredicateQuery extends Object
Represents a query in the form of a set of boolean variables that are considered true.- Author:
- Magnar Nedland, bjorncs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PredicateQuery.Feature
static class
PredicateQuery.RangeFeature
-
Constructor Summary
Constructors Constructor Description PredicateQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFeature(String key, String value)
Adds a feature to the queryvoid
addFeature(String key, String value, long subqueryBitMap)
Adds a feature to the query, e.g.void
addRangeFeature(String key, long value)
void
addRangeFeature(String key, long value, long subqueryBitMap)
Adds a range feature to the query, e.g.List<PredicateQuery.Feature>
getFeatures()
Returns a list of featuresList<PredicateQuery.RangeFeature>
getRangeFeatures()
Returns a list of range features
-
-
-
Method Detail
-
addFeature
public void addFeature(String key, String value)
Adds a feature to the query- Parameters:
key
- a feature keyvalue
- a feature value
-
addFeature
public void addFeature(String key, String value, long subqueryBitMap)
Adds a feature to the query, e.g. gender = male.- Parameters:
key
- Feature keyvalue
- Feature valuesubqueryBitMap
- The subquery bitmap for which this term is true
-
addRangeFeature
public void addRangeFeature(String key, long value)
-
addRangeFeature
public void addRangeFeature(String key, long value, long subqueryBitMap)
Adds a range feature to the query, e.g. age = 25.- Parameters:
key
- a feature keyvalue
- a feature valuesubqueryBitMap
- the subquery bitmap for which this term is true
-
getFeatures
public List<PredicateQuery.Feature> getFeatures()
Returns a list of features
-
getRangeFeatures
public List<PredicateQuery.RangeFeature> getRangeFeatures()
Returns a list of range features
-
-