Package com.yahoo.prelude
Class IndexFacts
- java.lang.Object
-
- com.yahoo.prelude.IndexFacts
-
public class IndexFacts extends java.lang.Object
A central repository for information about indices. Standard usage isIndexFacts.Session session = indexFacts.newSession(query); // once when starting to process a query session.getIndex(indexName).[get index info]
- Author:
- Steinar Knutsen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
IndexFacts.Session
Create an instance of this to look up index facts with a given query.
-
Constructor Summary
Constructors Constructor Description IndexFacts()
IndexFacts(IndexModel indexModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
clustersHavingSearchDefinition(java.lang.String searchDefinitionName)
IndexFacts
freeze()
Freeze this to prevent further changes.java.lang.String
getDefaultPosition(java.lang.String sdName)
boolean
hasNGramIndices()
Whether this contains any index which has isNGram()==true.boolean
isFrozen()
Returns whether it is permissible to update this objectIndexFacts.Session
newSession(Query query)
IndexFacts.Session
newSession(java.util.Collection<java.lang.String> sources, java.util.Collection<java.lang.String> restrict)
IndexFacts.Session
newSession(java.util.Collection<java.lang.String> sources, java.util.Collection<java.lang.String> restrict, java.util.Set<java.lang.String> candidateDocumentTypes)
-
-
-
Constructor Detail
-
IndexFacts
public IndexFacts()
-
IndexFacts
public IndexFacts(IndexModel indexModel)
-
-
Method Detail
-
clustersHavingSearchDefinition
public java.util.List<java.lang.String> clustersHavingSearchDefinition(java.lang.String searchDefinitionName)
-
freeze
public IndexFacts freeze()
Freeze this to prevent further changes.- Returns:
- this for chaining
-
hasNGramIndices
public boolean hasNGramIndices()
Whether this contains any index which has isNGram()==true. This is free to ask on a frozen instance.
-
isFrozen
public boolean isFrozen()
Returns whether it is permissible to update this object
-
getDefaultPosition
public java.lang.String getDefaultPosition(java.lang.String sdName)
-
newSession
public IndexFacts.Session newSession(Query query)
-
newSession
public IndexFacts.Session newSession(java.util.Collection<java.lang.String> sources, java.util.Collection<java.lang.String> restrict)
-
newSession
public IndexFacts.Session newSession(java.util.Collection<java.lang.String> sources, java.util.Collection<java.lang.String> restrict, java.util.Set<java.lang.String> candidateDocumentTypes)
-
-