How Presearchers optimize query matching
masterA Presearcher reduces the number of queries the Monitor must run against an InputDocument by filtering them out early. Luwak provides three built-in implementations:
MatchAllPresearcher: Performs no filtering; all registered queries are run against every document.TermFilteredPresearcher: Extracts terms from registered queries and indexes them in an internal index. At match-time, theInputDocumentis tokenized, and only queries matching the document's terms are executed.MultipassTermFilteredPresearcher: An extension ofTermFilteredPresearcherthat improves filtering for phrase queries by indexing various combinations of terms.