Package org.apache.lucene.monitor
Class Presearcher
- java.lang.Object
-
- org.apache.lucene.monitor.Presearcher
-
- Direct Known Subclasses:
TermFilteredPresearcher
public abstract class Presearcher extends Object
A Presearcher is used by the Monitor to reduce the number of queries actually run against a Document. It defines how queries are stored in the monitor's internal index, and how a Document is converted to a query against that index.
-
-
Field Summary
Fields Modifier and Type Field Description static Presearcher
NO_FILTERING
A Presearcher implementation that does no query filtering, and runs all registered queries
-
Constructor Summary
Constructors Constructor Description Presearcher()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract Query
buildQuery(LeafReader reader, BiPredicate<String,BytesRef> termAcceptor)
Build a query for a Monitor's queryindex from a LeafReader over a set of documents to monitor.abstract Document
indexQuery(Query query, Map<String,String> metadata)
Build a lucene Document to index the query in a Monitor's queryindex
-
-
-
Field Detail
-
NO_FILTERING
public static final Presearcher NO_FILTERING
A Presearcher implementation that does no query filtering, and runs all registered queries
-
-
Method Detail
-
buildQuery
public abstract Query buildQuery(LeafReader reader, BiPredicate<String,BytesRef> termAcceptor)
Build a query for a Monitor's queryindex from a LeafReader over a set of documents to monitor.- Parameters:
reader
- aLeafReader
over the input documentstermAcceptor
- a predicate indicating if a term should be added to the query- Returns:
- a Query to run over a Monitor's queryindex
-
-