| java.lang.Object org.apache.solr.search.LuceneQueryOptimizer
LuceneQueryOptimizer | class LuceneQueryOptimizer (Code) | | Utility which converts certain query clauses into
QueryFilter s and
caches these. Only required
TermQuery s whose boost is zero and
whose term occurs in at least a certain fraction of documents are converted
to cached filters. This accellerates query constraints like language,
document format, etc., which do not affect ranking but might otherwise slow
search considerably.
|
Constructor Summary | |
public | LuceneQueryOptimizer(int cacheSize, float threshold) Construct an optimizer that caches and uses filters for required
TermQuery s whose boost is zero. |
Method Summary | |
public TopDocs | optimize(BooleanQuery original, Searcher searcher, int numHits, Query[] queryOut, Filter[] filterOut) |
LuceneQueryOptimizer | public LuceneQueryOptimizer(int cacheSize, float threshold)(Code) | | Construct an optimizer that caches and uses filters for required
TermQuery s whose boost is zero.
Parameters: cacheSize - the number of QueryFilters to cache Parameters: threshold - the fraction of documents which must contain term |
optimize | public TopDocs optimize(BooleanQuery original, Searcher searcher, int numHits, Query[] queryOut, Filter[] filterOut) throws IOException(Code) | | |
|
|