Examples of IndicesStatsRequestBuilder


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

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

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

    @Override
    public IndicesStatsRequestBuilder prepareStats(String... indices) {
        return new IndicesStatsRequestBuilder(this).setIndices(indices);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.