Package org.elasticsearch.index.shard.service

Examples of org.elasticsearch.index.shard.service.IndexShard.optimize()


    }

    @Override protected ShardOptimizeResponse shardOperation(ShardOptimizeRequest request) throws ElasticSearchException {
        synchronized (optimizeMutex) {
            IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId());
            indexShard.optimize(new Engine.Optimize()
                    .waitForMerge(request.waitForMerge())
                    .maxNumSegments(request.maxNumSegments())
                    .onlyExpungeDeletes(request.onlyExpungeDeletes())
                    .flush(request.flush())
                    .refresh(request.refresh())
View Full Code Here


    }

    @Override
    protected ShardOptimizeResponse shardOperation(ShardOptimizeRequest request) throws ElasticsearchException {
        IndexShard indexShard = indicesService.indexServiceSafe(request.shardId().getIndex()).shardSafe(request.shardId().id());
        indexShard.optimize(new Engine.Optimize()
                .waitForMerge(request.waitForMerge())
                .maxNumSegments(request.maxNumSegments())
                .onlyExpungeDeletes(request.onlyExpungeDeletes())
                .flush(request.flush())
                .upgrade(request.upgrade())
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.