Package com.yahoo.prelude
Class IndexFacts.Session
- java.lang.Object
-
- com.yahoo.prelude.IndexFacts.Session
-
- Enclosing class:
- IndexFacts
public class IndexFacts.Session extends java.lang.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
documentTypes()
Returns an immutable list of the document types this has resolved tojava.lang.String
getCanonicName(java.lang.String indexName)
Returns the canonical form of the index name (Which may be the same as the input).Index
getIndex(java.lang.String indexName)
Returns the index for this name.Index
getIndex(java.lang.String indexName, java.lang.String documentType)
Returns an index given from a given search definitionjava.util.Collection<Index>
getIndexes(java.lang.String documentType)
Returns all the indexes of a given search definitionboolean
isIndex(java.lang.String indexName)
Returns whether the given name is an index.java.lang.String
toString()
-
-
-
Method Detail
-
getIndex
public Index getIndex(java.lang.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(java.lang.String indexName, java.lang.String documentType)
Returns an index given from a given search definition
-
getIndexes
public java.util.Collection<Index> getIndexes(java.lang.String documentType)
Returns all the indexes of a given search definition
-
getCanonicName
public java.lang.String getCanonicName(java.lang.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(java.lang.String indexName)
Returns whether the given name is an index.- Parameters:
indexName
- index name candidate
-
documentTypes
public java.util.List<java.lang.String> documentTypes()
Returns an immutable list of the document types this has resolved to
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-