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();
   }
 }
 public synchronized void clear() {
   parentIndexFieldData = null;
   List<Throwable> exceptions = new ArrayList<>(0);
   final Collection<IndexFieldDataCache> fieldDataCacheValues = fieldDataCaches.values();
   for (IndexFieldDataCache cache : fieldDataCacheValues) {
     try {
       cache.clear();
     } catch (Throwable t) {
       exceptions.add(t);
     }
   }
   fieldDataCacheValues.clear();
   ExceptionsHelper.maybeThrowRuntimeAndSuppress(exceptions);
 }
 public synchronized void clearField(final String fieldName) {
   if (ParentFieldMapper.NAME.equals(fieldName)) {
     parentIndexFieldData = null;
   }
   List<Throwable> exceptions = new ArrayList<>(0);
   final IndexFieldDataCache cache = fieldDataCaches.remove(fieldName);
   if (cache != null) {
     try {
       cache.clear();
     } catch (Throwable t) {
       exceptions.add(t);
     }
   }
   ExceptionsHelper.maybeThrowRuntimeAndSuppress(exceptions);
 }