indexReader = null;
}
public ShardSuggestStatisticsResponse getStatistics() {
ShardSuggestStatisticsResponse shardSuggestStatisticsResponse = new ShardSuggestStatisticsResponse(shardId());
for (FieldType fieldType : analyzingSuggesterCache.asMap().keySet()) {
long sizeInBytes = analyzingSuggesterCache.getIfPresent(fieldType).ramBytesUsed();
FstStats.FstIndexShardStats fstIndexShardStats = new FstStats.FstIndexShardStats(shardId, "analyzingsuggester", fieldType, sizeInBytes);
shardSuggestStatisticsResponse.getFstIndexShardStats().add(fstIndexShardStats);
}
for (FieldType fieldType : fuzzySuggesterCache.asMap().keySet()) {
long sizeInBytes = fuzzySuggesterCache.getIfPresent(fieldType).ramBytesUsed();
FstStats.FstIndexShardStats fstIndexShardStats = new FstStats.FstIndexShardStats(shardId, "fuzzysuggester", fieldType, sizeInBytes);
shardSuggestStatisticsResponse.getFstIndexShardStats().add(fstIndexShardStats);
}
return shardSuggestStatisticsResponse;
}