Package com.yahoo.search.predicate
Class PredicateIndex
java.lang.Object
com.yahoo.search.predicate.PredicateIndex
An index of
Predicate
objects.
Use a PredicateQuery
to find the ids of documents that have matching Predicates.
Create an instance of PredicateIndex
using the PredicateIndexBuilder
.
To build a PredicateQuery
you add features and rangeFeatures with a 64-bit
bitmap specifying which subqueries they appear in.
To perform a search, create a PredicateIndex.Searcher
and call its PredicateIndex.Searcher.search(PredicateQuery)
method, which returns a stream of Hit
objects,
each of which contains a document id and a 64-bit bitmap specifying which subqueries the hit is for.
Note that the PredicateIndex
is thread-safe, but a PredicateIndex.Searcher
is not.
Each thread must use its own searcher.
- Author:
- Magnar Nedland, bjorncs
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PredicateIndex
void
searcher()
Create a new searcher.void
-
Method Details
-
rebuildPostingListCache
public void rebuildPostingListCache() -
searcher
Create a new searcher. -
writeToOutputStream
- Throws:
IOException
-
fromInputStream
- Throws:
IOException
-