Class IndexFacts.Session

java.lang.Object
com.yahoo.prelude.IndexFacts.Session
Enclosing class:
IndexFacts

public class IndexFacts.Session extends Object
Create an instance of this to look up index facts with a given query. Note that if the model.source or model.restrict parameters of the query is changed another session should be created. This is immutable.
  • Method Details

    • getIndex

      public Index getIndex(String indexName)
      Returns the index for this name.
      Parameters:
      indexName - the name of the index. If this is null or empty the index named "default" is returned
      Returns:
      the index best matching the input parameters or the null Index (never null) if none is found
    • getIndex

      public Index getIndex(String indexName, String documentType)
      Returns an index given from a given search definition
    • getIndexes

      public Collection<Index> getIndexes(String documentType)
      Returns all the indexes of a given search definition
    • getCanonicName

      public String getCanonicName(String indexName)
      Returns the canonical form of the index name (Which may be the same as the input).
      Parameters:
      indexName - index name or alias
    • isIndex

      public boolean isIndex(String indexName)
      Returns whether the given name is an index.
      Parameters:
      indexName - index name candidate
    • documentTypes

      public List<String> documentTypes()
      Returns an immutable list of the document types this has resolved to
    • toString

      public String toString()
      Overrides:
      toString in class Object