void parseExistingDocPercolate( PercolateRequest percolateRequest, RestRequest restRequest, RestChannel restChannel, final Client client) { String index = restRequest.param("index"); String type = restRequest.param("type"); percolateRequest.indices( Strings.splitStringByCommaToArray(restRequest.param("percolate_index", index))); percolateRequest.documentType(restRequest.param("percolate_type", type)); GetRequest getRequest = new GetRequest(index, type, restRequest.param("id")); getRequest.routing(restRequest.param("routing")); getRequest.preference(restRequest.param("preference")); getRequest.refresh(restRequest.paramAsBoolean("refresh", getRequest.refresh())); getRequest.realtime(restRequest.paramAsBoolean("realtime", getRequest.realtime())); getRequest.version(RestActions.parseVersion(restRequest)); getRequest.versionType( VersionType.fromString(restRequest.param("version_type"), getRequest.versionType())); percolateRequest.getRequest(getRequest); percolateRequest.routing(restRequest.param("percolate_routing")); percolateRequest.preference(restRequest.param("percolate_preference")); percolateRequest.source(RestActions.getRestContent(restRequest)); percolateRequest.indicesOptions( IndicesOptions.fromRequest(restRequest, percolateRequest.indicesOptions())); executePercolate(percolateRequest, restChannel, client); }
void parseDocPercolate( PercolateRequest percolateRequest, RestRequest restRequest, RestChannel restChannel, final Client client) { percolateRequest.indices(Strings.splitStringByCommaToArray(restRequest.param("index"))); percolateRequest.documentType(restRequest.param("type")); percolateRequest.routing(restRequest.param("routing")); percolateRequest.preference(restRequest.param("preference")); percolateRequest.source(RestActions.getRestContent(restRequest)); percolateRequest.indicesOptions( IndicesOptions.fromRequest(restRequest, percolateRequest.indicesOptions())); executePercolate(percolateRequest, restChannel, client); }