Skip to content

Commit

Permalink
Java api: fixed inconsistencies in PercolateRequest, added return typ…
Browse files Browse the repository at this point in the history
…e for method chaining where missing

Closes #7294
  • Loading branch information
javanna committed Aug 15, 2014
1 parent 5c7cefa commit d0e2d76
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -88,8 +88,9 @@ public String documentType() {
return documentType;
}

public void documentType(String type) {
public PercolateRequest documentType(String type) {
this.documentType = type;
return this;
}

public String routing() {
Expand All @@ -114,8 +115,9 @@ public GetRequest getRequest() {
return getRequest;
}

public void getRequest(GetRequest getRequest) {
public PercolateRequest getRequest(GetRequest getRequest) {
this.getRequest = getRequest;
return this;
}

/**
Expand All @@ -137,6 +139,7 @@ public PercolateRequest source(Map document) throws ElasticsearchGenerationExcep
return source(document, Requests.CONTENT_TYPE);
}

@SuppressWarnings("unchecked")
public PercolateRequest source(Map document, XContentType contentType) throws ElasticsearchGenerationException {
try {
XContentBuilder builder = XContentFactory.contentBuilder(contentType);
Expand Down Expand Up @@ -187,8 +190,9 @@ public boolean onlyCount() {
return onlyCount;
}

public void onlyCount(boolean onlyCount) {
public PercolateRequest onlyCount(boolean onlyCount) {
this.onlyCount = onlyCount;
return this;
}

BytesReference docSource() {
Expand Down

0 comments on commit d0e2d76

Please sign in to comment.