public void clear(IndexReader reader) {
   synchronized (loadedFieldData) {
     for (IndexFieldData<?> indexFieldData : loadedFieldData.values()) {
       indexFieldData.clear(reader);
     }
     for (IndexFieldDataCache cache : fieldDataCaches.values()) {
       cache.clear(reader);
     }
   }
 }
 public void clearField(String fieldName) {
   synchronized (loadedFieldData) {
     IndexFieldData<?> fieldData = loadedFieldData.remove(fieldName);
     if (fieldData != null) {
       fieldData.clear();
     }
     IndexFieldDataCache cache = fieldDataCaches.remove(fieldName);
     if (cache != null) {
       cache.clear();
     }
   }
 }
 public void clear() {
   synchronized (loadedFieldData) {
     for (IndexFieldData<?> fieldData : loadedFieldData.values()) {
       fieldData.clear();
     }
     loadedFieldData.clear();
     for (IndexFieldDataCache cache : fieldDataCaches.values()) {
       cache.clear();
     }
     fieldDataCaches.clear();
   }
 }