Class PredicateQuery

java.lang.Object
com.yahoo.search.predicate.PredicateQuery

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
  • Constructor Details

    • PredicateQuery

      public PredicateQuery()
  • Method Details

    • addFeature

      public void addFeature(String key, String value)
      Adds a feature to the query
      Parameters:
      key - a feature key
      value - 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 key
      value - Feature value
      subqueryBitMap - 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 key
      value - a feature value
      subqueryBitMap - 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