summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-02-15 14:17:12 +0000
committerArne H Juul <arnej@yahooinc.com>2022-02-15 15:05:36 +0000
commitf83e44760a72cc7d0226352b1114ffc3a8f97dee (patch)
treee0ed02df063aaaa0f3adab688b43018b774ce0c7 /vespaclient-container-plugin
parentd29d335828d98e248f1cb593882d2d4f08fe702c (diff)
add special DocumentOnly fieldset in Java as well
* should have same behavior in Java and C++ * extend unit tests to verify * note various places where we want to change the default on Vespa 8 branch
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java
index 180ddca2ca5..4d7c2f1cc14 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java
@@ -20,6 +20,7 @@ import com.yahoo.document.FixedBucketSpaces;
import com.yahoo.document.TestAndSetCondition;
import com.yahoo.document.config.DocumentmanagerConfig;
import com.yahoo.document.fieldset.AllFields;
+import com.yahoo.document.fieldset.DocumentOnly;
import com.yahoo.document.fieldset.DocIdOnly;
import com.yahoo.document.idstring.IdIdString;
import com.yahoo.document.json.DocumentOperationType;
@@ -379,6 +380,7 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler {
StorageCluster destination = resolveCluster(Optional.of(requireProperty(request, DESTINATION_CLUSTER)), clusters);
VisitorParameters parameters = parseParameters(request, path);
parameters.setRemoteDataHandler("[Content:cluster=" + destination.name() + "]"); // Bypass indexing.
+ // TODO Vespa 8: change to DocumentOnly.NAME
parameters.setFieldSet(AllFields.NAME);
return () -> {
visitWithRemote(request, parameters, handler);
@@ -1088,6 +1090,7 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler {
throw new IllegalArgumentException("Must set 'cluster' parameter to a valid content cluster id when visiting at a root /document/v1/ level");
VisitorParameters parameters = parseCommonParameters(request, path, cluster);
+ // TODO Vespa 8: change to DocumentOnly.NAME
parameters.setFieldSet(getProperty(request, FIELD_SET).orElse(path.documentType().map(type -> type + ":[document]").orElse(AllFields.NAME)));
parameters.setMaxTotalHits(wantedDocumentCount);
parameters.visitInconsistentBuckets(true);