Examples of routing()


Examples of crate.elasticsearch.action.export.ExportRequest.routing()

                    if (querySource != null) {
                        exportRequest.source(querySource, false);
                    }
                }
            }
            exportRequest.routing(request.param("routing"));
            exportRequest.types(splitTypes(request.param("type")));
            exportRequest.preference(request.param("preference", "_primary"));
        } catch (Exception e) {
            try {
                XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
View Full Code Here

Examples of crate.elasticsearch.action.searchinto.SearchIntoRequest.routing()

                    if (querySource != null) {
                        searchIntoRequest.source(querySource, false);
                    }
                }
            }
            searchIntoRequest.routing(request.param("routing"));
            searchIntoRequest.types(splitTypes(request.param("type")));
            searchIntoRequest.preference(request.param("preference",
                    "_primary"));
        } catch (Exception e) {
            try {
View Full Code Here

Examples of org.elasticsearch.action.DocumentRequest.routing()

                        // make sure the request gets never processed again
                        bulkRequest.requests.set(i, null);
                    }
                } else {
                    concreteIndices.resolveIfAbsent(req.index(), req.indicesOptions());
                    req.routing(clusterState.metaData().resolveIndexRouting(req.routing(), req.index()));
                }
            }
        }

        // first, go over all the requests and create a ShardId -> Operations mapping
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.shards.ClusterSearchShardsRequest.routing()

        final ClusterSearchShardsRequest clusterSearchShardsRequest = Requests.clusterSearchShardsRequest(indices);
        clusterSearchShardsRequest.local(request.paramAsBoolean("local", clusterSearchShardsRequest.local()));
        clusterSearchShardsRequest.listenerThreaded(false);

        clusterSearchShardsRequest.types(Strings.splitStringByCommaToArray(request.param("type")));
        clusterSearchShardsRequest.routing(request.param("routing"));
        clusterSearchShardsRequest.preference(request.param("preference"));
        clusterSearchShardsRequest.indicesOptions(IndicesOptions.fromRequest(request, clusterSearchShardsRequest.indicesOptions()));

        client.admin().cluster().searchShards(clusterSearchShardsRequest, new RestToXContentListener<ClusterSearchShardsResponse>(channel));
    }
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions.routing()

        indicesAliasesRequest.addAliasAction(aliasAction);
        indicesAliasesRequest.masterNodeTimeout(request.paramAsTime("master_timeout", indicesAliasesRequest.masterNodeTimeout()));


        if (routing != null) {
            aliasAction.routing(routing);
        }
        if (searchRouting != null) {
            aliasAction.searchRouting(searchRouting);
        }
        if (indexRouting != null) {
View Full Code Here

Examples of org.elasticsearch.action.count.CountRequest.routing()

                } else {
                    countRequest.query(RestActions.parseQuerySource(request));
                }
            }
            countRequest.queryHint(request.param("query_hint"));
            countRequest.routing(request.param("routing"));
            countRequest.minScore(request.paramAsFloat("min_score", DEFAULT_MIN_SCORE));
            countRequest.types(splitTypes(request.param("type")));
        } catch (Exception e) {
            try {
                XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
View Full Code Here

Examples of org.elasticsearch.action.count.CountRequest.routing()

                } else {
                    countRequest.query(RestActions.parseQuerySource(request));
                }
            }
            countRequest.queryHint(request.param("query_hint"));
            countRequest.routing(request.param("routing"));
            countRequest.minScore(request.paramAsFloat("min_score", DEFAULT_MIN_SCORE));
            countRequest.types(splitTypes(request.param("type")));
        } catch (Exception e) {
            try {
                XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
View Full Code Here

Examples of org.elasticsearch.action.delete.DeleteRequest.routing()

        // TODO: this was causing issues, do we need it?
        // deleteRequest.version(RestActions.parseVersion(request));
        // deleteRequest.versionType(VersionType.fromString(request.param("version_type"),
        // deleteRequest.versionType()));

        deleteRequest.routing(request.param("routing"));

        return deleteRequest;
    }

    /**
 
View Full Code Here

Examples of org.elasticsearch.action.delete.DeleteRequest.routing()

    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        DeleteRequest deleteRequest = new DeleteRequest(request.param("index"), request.param("type"), request.param("id"));
        deleteRequest.parent(request.param("parent"));
        deleteRequest.routing(request.param("routing"));
        deleteRequest.timeout(request.paramAsTime("timeout", DeleteRequest.DEFAULT_TIMEOUT));
        deleteRequest.refresh(request.paramAsBoolean("refresh", deleteRequest.refresh()));
        deleteRequest.version(RestActions.parseVersion(request));
        // we just send a response, no need to fork
        deleteRequest.listenerThreaded(false);
View Full Code Here

Examples of org.elasticsearch.action.delete.DeleteRequest.routing()

                }
                list.add(new BulkItemRequest(i, request));
            } else if (request instanceof DeleteRequest) {
                DeleteRequest deleteRequest = (DeleteRequest) request;
                MappingMetaData mappingMd = clusterState.metaData().index(deleteRequest.index()).mapping(deleteRequest.type());
                if (mappingMd != null && mappingMd.routing().required() && deleteRequest.routing() == null) {
                    // if routing is required, and no routing on the delete request, we need to broadcast it....
                    GroupShardsIterator groupShards = clusterService.operationRouting().broadcastDeleteShards(clusterState, deleteRequest.index());
                    for (ShardIterator shardIt : groupShards) {
                        List<BulkItemRequest> list = requestsByShard.get(shardIt.shardId());
                        if (list == null) {
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.