Skip to content

Commit

Permalink
Add toString() to MultiSearchRequest class.
Browse files Browse the repository at this point in the history
fix #12144

Signed-off-by: Guillaume Alvarez <[email protected]>
  • Loading branch information
guillaume-alvarez committed Feb 5, 2024
1 parent 6b2c2f2 commit c3cdde4
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -594,4 +594,25 @@ public void writeTo(StreamOutput out) throws IOException {
}
waitForActiveShards.writeTo(out);
}

@Override
public String toString() {
return "CreateIndexRequest{"
+ "cause='"
+ cause
+ '\''
+ ", index='"
+ index
+ '\''
+ ", settings="
+ settings
+ ", mappings='"
+ mappings
+ '\''
+ ", aliases="
+ aliases
+ ", waitForActiveShards="
+ waitForActiveShards
+ '}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -583,4 +583,19 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
return builder;
}

@Override
public String toString() {
return "MultiGetRequest{"

Check warning on line 588 in server/src/main/java/org/opensearch/action/get/MultiGetRequest.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/action/get/MultiGetRequest.java#L588

Added line #L588 was not covered by tests
+ "preference='"
+ preference
+ '\''
+ ", realtime="
+ realtime
+ ", refresh="
+ refresh
+ ", items="
+ items
+ '}';
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -398,4 +398,16 @@ public boolean shouldCancelChildrenOnCancellation() {
}
};
}

@Override
public String toString() {
return "MultiSearchRequest{"

Check warning on line 404 in server/src/main/java/org/opensearch/action/search/MultiSearchRequest.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/action/search/MultiSearchRequest.java#L404

Added line #L404 was not covered by tests
+ "maxConcurrentSearchRequests="
+ maxConcurrentSearchRequests
+ ", requests="
+ requests
+ ", indicesOptions="
+ indicesOptions
+ '}';
}
}

0 comments on commit c3cdde4

Please sign in to comment.