diff options
author | Tor Brede Vekterli <vekterli@verizonmedia.com> | 2019-07-19 15:05:07 +0200 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@verizonmedia.com> | 2019-07-19 15:05:07 +0200 |
commit | 76e142fd3b7dd90e6ba0bc9cd85ee83c207aff43 (patch) | |
tree | 5dec598e4632675e4643c549fd9d2dc38e7486b5 /vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java | |
parent | 2d3c0e73105c65c5d3649b09f79d81a5f97cb661 (diff) |
Support `cluster` parameter for Document V1 Get operations
Makes point lookup cluster routing functionality equal to that of
visiting operations. Especially useful as the difference between
these is minimal when used via the Document V1 REST API.
Diffstat (limited to 'vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java')
-rw-r--r-- | vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java index d2fd8d92495..7e572dae941 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java @@ -262,8 +262,9 @@ public class RestApi extends LoggingRequestHandler { } private HttpResponse handleGet(RestUri restUri, HttpRequest request) throws RestApiException { - final Optional<String> fieldSet = requestProperty("fieldSet", request); - final Optional<String> getDocument = operationHandler.get(restUri, fieldSet); + final Optional<String> fieldSet = requestProperty(FIELD_SET, request); + final Optional<String> cluster = requestProperty(CLUSTER, request); + final Optional<String> getDocument = operationHandler.get(restUri, fieldSet, cluster); final ObjectNode resultNode = mapper.createObjectNode(); if (getDocument.isPresent()) { final JsonNode parseNode; |