Examples of listenerThreaded()


Examples of org.elasticsearch.action.index.IndexRequest.listenerThreaded()

        if (consistencyLevel != null) {
            indexRequest.consistencyLevel(WriteConsistencyLevel.fromString(consistencyLevel));
        }

        // we just send a response, no need to fork
        indexRequest.listenerThreaded(true);

        // we don't spawn, then fork if local
        indexRequest.operationThreaded(true);

        return indexRequest;
View Full Code Here

Examples of org.elasticsearch.action.index.IndexRequest.listenerThreaded()

        String consistencyLevel = request.param("consistency");
        if (consistencyLevel != null) {
            indexRequest.consistencyLevel(WriteConsistencyLevel.fromString(consistencyLevel));
        }
        // we just send a response, no need to fork
        indexRequest.listenerThreaded(false);
        // we don't spawn, then fork if local
        indexRequest.operationThreaded(true);
        client.index(indexRequest, new ActionListener<IndexResponse>() {
            @Override public void onResponse(IndexResponse response) {
                try {
View Full Code Here

Examples of org.elasticsearch.action.index.IndexRequest.listenerThreaded()

    if (consistencyLevel != null) {
      indexRequest.consistencyLevel(WriteConsistencyLevel.fromString(consistencyLevel));
    }

    // we just send a response, no need to fork
    indexRequest.listenerThreaded(true);

    // we don't spawn, then fork if local
    indexRequest.operationThreaded(true);

    return indexRequest;
View Full Code Here

Examples of org.elasticsearch.action.mlt.MoreLikeThisRequest.listenerThreaded()

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        MoreLikeThisRequest mltRequest = moreLikeThisRequest(request.param("index")).type(request.param("type")).id(request.param("id"));
        mltRequest.routing(request.param("routing"));

        mltRequest.listenerThreaded(false);
        //TODO the ParseField class that encapsulates the supported names used for an attribute
        //needs some work if it is to be used in a REST context like this too
        // See the MoreLikeThisQueryParser constants that hold the valid syntax
        mltRequest.fields(request.paramAsStringArray("mlt_fields", null));
        mltRequest.minimumShouldMatch(request.param("minimum_should_match", "0"));
View Full Code Here

Examples of org.elasticsearch.action.percolate.PercolateRequest.listenerThreaded()

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        PercolateRequest percolateRequest = new PercolateRequest(request.param("index"), request.param("type"));
        percolateRequest.source(request.contentByteArray(), request.contentByteArrayOffset(), request.contentLength(), request.contentUnsafe());

        // we just send a response, no need to fork
        percolateRequest.listenerThreaded(false);
        // we don't spawn, then fork if local
        percolateRequest.operationThreaded(true);

        percolateRequest.preferLocal(request.paramAsBoolean("prefer_local", percolateRequest.preferLocalShard()));
        client.percolate(percolateRequest, new ActionListener<PercolateResponse>() {
View Full Code Here

Examples of org.elasticsearch.action.search.MultiSearchRequest.listenerThreaded()

    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) throws Exception {
        MultiSearchRequest multiSearchRequest = new MultiSearchRequest();
        multiSearchRequest.listenerThreaded(false);

        String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
        String[] types = Strings.splitStringByCommaToArray(request.param("type"));
        IndicesOptions indicesOptions = IndicesOptions.fromRequest(request, multiSearchRequest.indicesOptions());
        multiSearchRequest.add(RestActions.getRestContent(request), request.contentUnsafe(), indices, types, request.param("search_type"), request.param("routing"), indicesOptions, allowExplicitIndex);
View Full Code Here

Examples of org.elasticsearch.action.search.SearchRequest.listenerThreaded()

    // Get the parameters
    final Map<String, List<String>> params = parseUriParams(request.uri());

    // generate the search request
    SearchRequest searchRequest = getSearchRequest(params, request);
    searchRequest.listenerThreaded(false);

    // execute the search
    client.search(searchRequest, new ActionListener<SearchResponse>() {
      @Override
      public void onResponse(SearchResponse response) {
View Full Code Here

Examples of org.elasticsearch.action.search.SearchRequest.listenerThreaded()

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        SearchRequest searchRequest;
        try {
            searchRequest = parseSearchRequest(request);
            searchRequest.listenerThreaded(false);
            SearchOperationThreading operationThreading = SearchOperationThreading.fromString(request.param("operation_threading"), null);
            if (operationThreading != null) {
                if (operationThreading == SearchOperationThreading.NO_THREADS) {
                    // since we don't spawn, don't allow no_threads, but change it to a single thread
                    operationThreading = SearchOperationThreading.SINGLE_THREAD;
View Full Code Here

Examples of org.elasticsearch.action.search.SearchRequest.listenerThreaded()

    // Get the parameters
    final Map<String, List<String>> params = parseUriParams(request.uri());

    // generate the search request
    SearchRequest searchRequest = getSearchRequest(params, request);
    searchRequest.listenerThreaded(false);

    // execute the search
    client.search(searchRequest, new ActionListener<SearchResponse>() {
      @Override
      public void onResponse(SearchResponse response) {
View Full Code Here

Examples of org.elasticsearch.action.search.SearchRequest.listenerThreaded()

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        SearchRequest searchRequest;
        searchRequest = RestSearchAction.parseSearchRequest(request);
        searchRequest.listenerThreaded(false);
        client.search(searchRequest, new RestStatusToXContentListener<SearchResponse>(channel));
    }

    public static SearchRequest parseSearchRequest(RestRequest request) {
        String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
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.