Package de.spinscale.elasticsearch.action.suggest.statistics

Examples of de.spinscale.elasticsearch.action.suggest.statistics.ShardSuggestStatisticsResponse


        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;
    }
View Full Code Here

TOP

Related Classes of de.spinscale.elasticsearch.action.suggest.statistics.ShardSuggestStatisticsResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.