Package org.elasticsearch.action.update

Examples of org.elasticsearch.action.update.UpdateRequest.version()


        UpdateRequest request = new UpdateRequest(node.indices()[0],
                Constants.DEFAULT_MAPPING_TYPE, node.ids().get(0));
        request.fields(node.columns());
        request.paths(node.updateDoc());
        if (node.version().isPresent()) {
            request.version(node.version().get());
        } else {
            request.retryOnConflict(Constants.UPDATE_RETRY_ON_CONFLICT);
        }
        request.routing(node.routingValues().get(0));
        return request;
View Full Code Here


            if (sFields != null) {
                updateRequest.fields(sFields);
            }
        }
        updateRequest.retryOnConflict(request.paramAsInt("retry_on_conflict", updateRequest.retryOnConflict()));
        updateRequest.version(RestActions.parseVersion(request));
        updateRequest.versionType(VersionType.fromString(request.param("version_type"), updateRequest.versionType()));


        // see if we have it in the body
        if (request.hasContent()) {
View Full Code Here

                                new BulkItemResponse.Failure(request.index(), deleteRequest.type(), deleteRequest.id(), e)));
                    }
                }
            } else if (item.request() instanceof UpdateRequest) {
                UpdateRequest updateRequest = (UpdateRequest) item.request();
                preVersions[requestIndex] = updateRequest.version();
                preVersionTypes[requestIndex] = updateRequest.versionType();
                //  We need to do the requested retries plus the initial attempt. We don't do < 1+retry_on_conflict because retry_on_conflict may be Integer.MAX_VALUE
                for (int updateAttemptsCount = 0; updateAttemptsCount <= updateRequest.retryOnConflict(); updateAttemptsCount++) {
                    UpdateResult updateResult;
                    try {
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.