Class SchemaInfo.Session

java.lang.Object
com.yahoo.search.schema.SchemaInfo.Session
Enclosing class:
SchemaInfo

public static class SchemaInfo.Session extends Object
The schema information resolved to be relevant to this session.
  • Method Details

    • isStreaming

      public boolean isStreaming()
      Returns true if this only searches streaming clusters.
    • schemas

      public Collection<Schema> schemas()
    • fieldInfo

      public Optional<FieldInfo> fieldInfo(String fieldName)
      Looks up a field or field set by the given name or alias in the schemas resolved for this query. If there are several fields or field sets by this name or alias across the schemas of this session, one is chosen by random.
      Parameters:
      fieldName - the name or alias of the field or field set. If this is empty, the name "default" is looked up.
      Returns:
      the appropriate field or empty if no field or field set has this name or alias
    • rankProfileInput

      public RankProfile.InputType rankProfileInput(String rankFeature, String rankProfile)
      Returns the type of the given rank feature name in the given profile, if it can be uniquely determined.
      Parameters:
      rankFeature - the rank feature name, a string on the form "query(name)"
      rankProfile - the name of the rank profile in which to locate the input declaration
      Returns:
      the type of the declared input, or null if it is not declared or the rank profile is not found
      Throws:
      IllegalArgumentException - if the given rank profile does not exist in any schema, or the feature is declared in this rank profile in multiple schemas of this session with conflicting types