@Override
public Filter buildFilter() throws ParseException {
try
{
final SenseiFilter senseiFilter = FilterConstructor.constructFilter(filter, _qparser);
if (logger.isTraceEnabled() && senseiFilter != null) {
return new SenseiFilter() {
volatile boolean called = false;
@Override
public SenseiDocIdSet getSenseiDocIdSet(IndexReader reader) throws IOException {
SenseiDocIdSet docIdSet = senseiFilter.getSenseiDocIdSet(reader);
if(logger.isDebugEnabled() && !called) {
logger.debug("Running the query: " + (query == null ? "NULL" : query.toString()));
logger.debug("Plan(" + (reader.maxDoc() + 1) + "): " + docIdSet.getQueryPlan());
}
return docIdSet;