Date sentBefore = defaultDate(getSentBefore(), new Date());
List volumes = Config.getConfig().getVolumes().getVolumes();
LinkedList<Searcher> searchers = new LinkedList<Searcher>();
Iterator vl = volumes.iterator();
while (vl.hasNext()) {
Volume volume = (Volume)vl.next();
if (volume.getModified()!=null && sentAfter.compareTo(volume.getModified())>0) {
logger.debug("standard search: not using volume {modified='"+volume.getModified()+"', sentAfter='"+sentAfter+"',"+volume);
continue;
}
if (volume.getCreated()!=null && sentBefore.compareTo(volume.getCreated())<0) {
logger.debug("standard search: not using volume {created='"+volume.getCreated()+"', sentBefore='"+sentBefore+"',"+volume);
continue;
}
try {
if (volume.getStatus()==Volume.Status.ACTIVE || volume.getStatus()==Volume.Status.CLOSED) {
Searcher volsearcher = new IndexSearcher(volume.getIndexPath());
searchers.add(volsearcher);
searcherPresent = true;
}
} catch (IOException io) {
logger.error("failed to open index for search {"+volume+"}.");