diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-08-04 14:41:49 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-08-04 14:41:49 +0000 |
commit | f2fccce544576a28fa1078c5a497c0b65ea10781 (patch) | |
tree | c1ea9dda107a5ddedb909842f6d9331fe1fda557 /vespaclient-java/src/main/java/com/yahoo/vespaget | |
parent | db49d6d264873e7faf0e5df0a6dec42cc94888e8 (diff) |
Use named constants instead of strings sprinkled all over.
Diffstat (limited to 'vespaclient-java/src/main/java/com/yahoo/vespaget')
-rw-r--r-- | vespaclient-java/src/main/java/com/yahoo/vespaget/CommandLineOptions.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vespaclient-java/src/main/java/com/yahoo/vespaget/CommandLineOptions.java b/vespaclient-java/src/main/java/com/yahoo/vespaget/CommandLineOptions.java index 0bfdcbe75ff..b07c54399af 100644 --- a/vespaclient-java/src/main/java/com/yahoo/vespaget/CommandLineOptions.java +++ b/vespaclient-java/src/main/java/com/yahoo/vespaget/CommandLineOptions.java @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespaget; +import com.yahoo.document.fieldset.AllFields; +import com.yahoo.document.fieldset.DocIdOnly; import com.yahoo.documentapi.messagebus.protocol.DocumentProtocol; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; @@ -67,7 +69,7 @@ public class CommandLineOptions { options.addOption(Option.builder("f") .hasArg(true) - .desc("Retrieve the specified fields only (see https://docs.vespa.ai/documentation/documents.html#fieldsets) (default '[all]')") + .desc("Retrieve the specified fields only (see https://docs.vespa.ai/documentation/documents.html#fieldsets) (default '" + AllFields.NAME + "')") .longOpt(FIELDSET_OPTION) .argName("fieldset").build()); @@ -178,9 +180,9 @@ public class CommandLineOptions { } if (printIdsOnly) { - fieldSet = "[id]"; + fieldSet = DocIdOnly.NAME; } else if (fieldSet.isEmpty()) { - fieldSet = "[all]"; + fieldSet = AllFields.NAME; } if (!cluster.isEmpty() && !route.isEmpty()) { |