/**
  * Are we looking for all containers? If there are no positions we must have a better filter
  *
  * @return boolean
  */
 private boolean allContainers() {
   if (positions.length == 0) {
     return true;
   }
   for (StructuredFieldPosition sfp : positions) {
     if (sfp.getCachingTermPositions() != null) {
       return false;
     }
   }
   return true;
 }
 private void doClose() throws IOException {
   if (root != null) {
     root.close();
   }
   if (containers != null) {
     containers.close();
   }
   if (positions != null) {
     for (StructuredFieldPosition position : positions) {
       CachingTermPositions ctp = position.getCachingTermPositions();
       if (ctp != null) {
         ctp.close();
       }
     }
   }
 }