Package com.yahoo.prelude
Class IndexFacts
java.lang.Object
com.yahoo.prelude.IndexFacts
NOTE: We are in the process of moving the functionality of this over to
SchemaInfo
-
see if you can use that before adding usage of this.
A central repository for information about indices. Standard usage is
IndexFacts.Session session = indexFacts.newSession(query); // once when starting to process a query
session.getIndex(indexName).[get index info]
- Author:
- Steinar Knutsen
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Create an instance of this to look up index facts with a given query. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfreeze()
Freeze this to prevent further changes.getDefaultPosition
(String sdName) boolean
Whether this contains any index which has isNGram()==true.boolean
isFrozen()
Returns whether it is permissible to update this objectnewSession
(Query query) newSession
(Collection<String> sources, Collection<String> restrict) newSession
(Collection<String> sources, Collection<String> restrict, Set<String> candidateDocumentTypes)
-
Constructor Details
-
IndexFacts
public IndexFacts() -
IndexFacts
-
-
Method Details
-
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
-
newSession
-
newSession
-
newSession
public IndexFacts.Session newSession(Collection<String> sources, Collection<String> restrict, Set<String> candidateDocumentTypes)
-