Package org.elasticsearch.action.admin.indices.stats

Examples of org.elasticsearch.action.admin.indices.stats.IndicesStatsRequestBuilder


      IndexHealth newIndexHealth = new IndexHealth();
      newIndexHealth.name = index.getIndexName() + "/" + index.getIndexType();
      newIndexHealth.documentCount = indexStat.getDocumentCount();
      newIndexHealth.lastSync = indexStat.getLastUpdate();

      IndicesStatsRequestBuilder statRequest = searchClient.prepareStats(index.getIndexName())
        .setTypes(index.getIndexType());
      IndicesStatsResponse indicesStatsResponse = statRequest.get();
      newIndexHealth.segmentCount = indicesStatsResponse.getTotal().getSegments().getCount();
      newIndexHealth.pendingDeletion = indicesStatsResponse.getTotal().getDocs().getDeleted();

      builder.put(newIndexHealth.name, newIndexHealth);
    }
View Full Code Here


        execute(IndicesStatsAction.INSTANCE, request, listener);
    }

    @Override
    public IndicesStatsRequestBuilder prepareStats(String... indices) {
        return new IndicesStatsRequestBuilder(this).setIndices(indices);
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.indices.stats.IndicesStatsRequestBuilder

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.