Package org.elasticsearch.action.delete

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


        final String index = request.hasParam("index") ? request.param("index") : "solr";
        final String type = request.hasParam("type") ? request.param("type") : "docs";

        // create the delete request object
        DeleteRequest deleteRequest = new DeleteRequest(index, type, getId(id));
        deleteRequest.parent(request.param("parent"));

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


        controller.registerHandler(DELETE, "/{index}/{type}/{id}", this);
    }

    @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
View Full Code Here

    BulkRequestBuilder brb = _elasticClient.prepareBulk();
    for (String id: ids) {
     
      DeleteRequest dr = new DeleteRequest(_sIndexName, _sIndexType, id);
      if (null != sParentId) {
        dr.parent(sParentId);
      }
      brb.add(dr);
    }
    brb.setConsistencyLevel(WriteConsistencyLevel.ONE);
   
View Full Code Here

    final String index = request.hasParam("index") ? request.param("index") : "solr";
    final String type = request.hasParam("type") ? request.param("type") : "docs";

    // create the delete request object
    DeleteRequest deleteRequest = new DeleteRequest(index, type, getMD5(id));
    deleteRequest.parent(request.param("parent"));

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

        deleteRequest.listenerThreaded(false);
        deleteRequest.operationThreaded(true);

        deleteRequest.routing(request.param("routing"));
        deleteRequest.parent(request.param("parent")); // order is important, set it after routing, so it will set the routing
        deleteRequest.timeout(request.paramAsTime("timeout", DeleteRequest.DEFAULT_TIMEOUT));
        deleteRequest.refresh(request.paramAsBoolean("refresh", deleteRequest.refresh()));
        deleteRequest.version(RestActions.parseVersion(request));
        deleteRequest.versionType(VersionType.fromString(request.param("version_type"), deleteRequest.versionType()));
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.