if (queryAnalyzer == null)
throw new IllegalArgumentException("queryAnalyzer must not be null");
if (DEFAULT_CAPACITY <= 0) { // cache disabled?
MemoryIndex index = new MemoryIndex();
index.addField(FIELD_NAME, text, textAnalyzer);
return index.search(parse(query, queryAnalyzer));
}
Object key = Pool.createHashKeys(new Object[] {text, query, textAnalyzer, queryAnalyzer});
Float score = (Float) entries.get(key); // hit/miss ratio is app specific