Class CompiledQueryProfile

java.lang.Object
com.yahoo.component.AbstractComponent
com.yahoo.search.query.profile.compiled.CompiledQueryProfile
All Implemented Interfaces:
com.yahoo.component.Component, com.yahoo.component.Deconstructable, Cloneable, Comparable<com.yahoo.component.Component>

public class CompiledQueryProfile extends com.yahoo.component.AbstractComponent implements Cloneable
A query profile in a state where it is optimized for fast lookups.
Author:
bratseth
  • Constructor Details

  • Method Details

    • getRegistry

      public CompiledQueryProfileRegistry getRegistry()
      Returns the registry this belongs to, or null if none (in which case runtime profile reference assignment won't work)
    • getType

      public QueryProfileType getType()
      Returns the type of this or null if it has no type
    • isOverridable

      public final boolean isOverridable(com.yahoo.processing.request.CompoundName name, Map<String,String> context)
      Returns whether or not the given field name can be overridden at runtime. Attempts to override values which cannot be overridden will not fail but be ignored. Default: true.
      Parameters:
      name - the name of the field to check
      context - the context in which to check, or null if none
    • getType

      public final QueryProfileType getType(com.yahoo.processing.request.CompoundName name, Map<String,String> context)
      Returns the type of a given prefix reachable from this profile, or null if none
    • getTypes

      public DimensionalMap<QueryProfileType> getTypes()
      Returns the types reachable from this, or an empty map (never null) if none
    • getReferences

      public DimensionalMap<Object> getReferences()
      Returns the references reachable from this, or an empty map (never null) if none
    • listValues

      public final Map<String,Object> listValues(com.yahoo.processing.request.CompoundName prefix)
      Return all objects that start with the given prefix path using no context. Use "" to list all.

      For example, if {a.d => "a.d-value" ,a.e => "a.e-value", b.d => "b.d-value", then calling listValues("a") will return {"d" => "a.d-value","e" => "a.e-value"}

    • listValues

      public final Map<String,Object> listValues(String prefix)
    • listValues

      public final Map<String,Object> listValues(String prefix, Map<String,String> context)
      Return all objects that start with the given prefix path. Use "" to list all.

      For example, if {a.d => "a.d-value" ,a.e => "a.e-value", b.d => "b.d-value", then calling listValues("a") will return {"d" => "a.d-value","e" => "a.e-value"}

    • listValues

      public final Map<String,Object> listValues(com.yahoo.processing.request.CompoundName prefix, Map<String,String> context)
      Return all objects that start with the given prefix path. Use "" to list all.

      For example, if {a.d => "a.d-value" ,a.e => "a.e-value", b.d => "b.d-value", then calling listValues("a") will return {"d" => "a.d-value","e" => "a.e-value"}

    • listValues

      public Map<String,Object> listValues(com.yahoo.processing.request.CompoundName prefix, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
      Adds all objects that start with the given path prefix to the given value map. Use "" to list all.

      For example, if {a.d => "a.d-value" ,a.e => "a.e-value", b.d => "b.d-value", then calling listValues("a") will return {"d" => "a.d-value","e" => "a.e-value"}

    • listValuesWithSources

      public Map<String,ValueWithSource> listValuesWithSources(com.yahoo.processing.request.CompoundName prefix, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
    • get

      public final Object get(String name)
    • get

      public final Object get(String name, Map<String,String> context)
    • get

      public final Object get(String name, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
    • get

      public final Object get(com.yahoo.processing.request.CompoundName name, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
    • getEntries

      public final DimensionalMap<ValueWithSource> getEntries()
      Returns all the entries from the profile
    • clone

      public CompiledQueryProfile clone()
      Overrides:
      clone in class com.yahoo.component.AbstractComponent
    • toString

      public String toString()
      Overrides:
      toString in class com.yahoo.component.AbstractComponent