Class PredicateIndex

java.lang.Object
com.yahoo.search.predicate.PredicateIndex

public class PredicateIndex extends Object
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