summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/go/cmd/clone.go10
-rw-r--r--client/go/cmd/deploy.go8
-rw-r--r--client/go/cmd/document.go22
-rw-r--r--client/go/cmd/query.go10
-rw-r--r--client/go/cmd/root.go8
-rw-r--r--client/go/cmd/status.go28
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/SearchBuilder.java2
7 files changed, 59 insertions, 29 deletions
diff --git a/client/go/cmd/clone.go b/client/go/cmd/clone.go
index 9604476df4e..40209698478 100644
--- a/client/go/cmd/clone.go
+++ b/client/go/cmd/clone.go
@@ -30,11 +30,13 @@ func init() {
var cloneCmd = &cobra.Command{
// TODO: "application" and "list" subcommands?
- Use: "clone <sample-application-path> <target-directory>",
- Short: "Create files and directory structure for a new Vespa application from a sample application",
+ Use: "clone <sample-application-path> <target-directory>",
+ Short: "Create files and directory structure for a new Vespa application from a sample application",
+ Long: `Creates an application package file structure.
Example: "$ vespa clone vespa-cloud/album-recommendation my-app",
- Long: "Creates an application package file structure by copying a sample application\nfrom https://github.com/vespa-engine/sample-apps",
- Args: cobra.ExactArgs(2),
+
+The application package is copied from a sample application in https://github.com/vespa-engine/sample-apps`,
+ Args: cobra.ExactArgs(2),
Run: func(cmd *cobra.Command, args []string) {
cloneApplication(args[0], args[1])
},
diff --git a/client/go/cmd/deploy.go b/client/go/cmd/deploy.go
index 0dffe42cc5c..e053332cae2 100644
--- a/client/go/cmd/deploy.go
+++ b/client/go/cmd/deploy.go
@@ -34,7 +34,13 @@ func init() {
var deployCmd = &cobra.Command{
Use: "deploy <application-directory>",
Short: "Deploy (prepare and activate) an application package",
- Args: cobra.MaximumNArgs(1),
+ Long: `Deploy (prepare and activate) an application package.
+
+When this returns successfully the application package has been validated
+and activated on config servers. The process of applying it on individual nodes
+has started but may not have completed.`,
+ Example: "$ vespa deploy .",
+ Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
pkg, err := vespa.ApplicationPackageFrom(applicationSource(args))
if err != nil {
diff --git a/client/go/cmd/document.go b/client/go/cmd/document.go
index 4819d89fb7e..d4ca3119e0e 100644
--- a/client/go/cmd/document.go
+++ b/client/go/cmd/document.go
@@ -24,11 +24,14 @@ func init() {
var documentCmd = &cobra.Command{
Use: "document <json-file>",
Short: "Issue a document operation to Vespa",
- Long: `Issues the document operation in a file to Vespa.
+ Long: `Issue a document operation to Vespa.
+
The operation must be on the format documented in
https://docs.vespa.ai/en/reference/document-json-format.html#document-operations
-When this returns Success, the document is guaranteed to be visible in any
+
+When this returns successfully, the document is guaranteed to be visible in any
subsequent get or query operation.
+
To feed with high throughput, https://docs.vespa.ai/en/vespa-feed-client.html
should be used instead of this.`,
Example: `$ vespa document src/test/resources/A-Head-Full-of-Dreams.json`,
@@ -41,10 +44,11 @@ should be used instead of this.`,
var documentPutCmd = &cobra.Command{
Use: "put [<id>] <json-file>",
Short: "Writes a document to Vespa",
- Long: `Writes the document in the given file to Vespa.
+ Long: `Writes a document to Vespa.
+
If the document already exists, all its values will be replaced by this document.
If the document id is specified both as an argument and in the file the argument takes precedence.`,
- Args: cobra.RangeArgs(1, 2),
+ Args: cobra.RangeArgs(1, 2),
Example: `$ vespa document put src/test/resources/A-Head-Full-of-Dreams.json
$ vespa document put id:mynamespace:music::a-head-full-of-dreams src/test/resources/A-Head-Full-of-Dreams.json`,
Run: func(cmd *cobra.Command, args []string) {
@@ -59,9 +63,10 @@ $ vespa document put id:mynamespace:music::a-head-full-of-dreams src/test/resour
var documentUpdateCmd = &cobra.Command{
Use: "update [<id>] <json-file>",
Short: "Modifies some fields of an existing document",
- Long: `Updates the values of the fields given in a json file as specified in the file.
+ Long: `Updates the values of the fields given in a json file as specified in the file.
+
If the document id is specified both as an argument and in the file the argument takes precedence.`,
- Args: cobra.RangeArgs(1, 2),
+ Args: cobra.RangeArgs(1, 2),
Example: `$ vespa document update src/test/resources/A-Head-Full-of-Dreams-Update.json
$ vespa document update id:mynamespace:music::a-head-full-of-dreams src/test/resources/A-Head-Full-of-Dreams.json`,
Run: func(cmd *cobra.Command, args []string) {
@@ -76,9 +81,10 @@ $ vespa document update id:mynamespace:music::a-head-full-of-dreams src/test/res
var documentRemoveCmd = &cobra.Command{
Use: "remove <id or json.file>",
Short: "Removes a document from Vespa",
- Long: `Removes the document specified either as a document id or given in the json file.
+ Long: `Removes the document specified either as a document id or given in the json file.
+
If the document id is specified both as an argument and in the file the argument takes precedence.`,
- Args: cobra.ExactArgs(1),
+ Args: cobra.ExactArgs(1),
Example: `$ vespa document remove src/test/resources/A-Head-Full-of-Dreams-Remove.json
$ vespa document remove id:mynamespace:music::a-head-full-of-dreams`,
Run: func(cmd *cobra.Command, args []string) {
diff --git a/client/go/cmd/query.go b/client/go/cmd/query.go
index e49b51b79b8..0e9b48464ad 100644
--- a/client/go/cmd/query.go
+++ b/client/go/cmd/query.go
@@ -20,9 +20,13 @@ func init() {
}
var queryCmd = &cobra.Command{
- Use: "query",
- Short: "Issue a query to Vespa",
- Long: `TODO, example \"yql=select from sources * where title contains 'foo'\" hits=5`,
+ Use: "query <query-parameters>",
+ Short: "Issue a query to Vespa",
+ Example: `$ vespa query "yql=select from sources * where title contains 'foo';" hits=5`,
+ Long: `Issue a query to Vespa.
+
+Any parameter from https://docs.vespa.ai/en/reference/query-api-reference.html
+can be set by the syntax [parameter-name]=[value].`,
// TODO: Support referencing a query json file
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
diff --git a/client/go/cmd/root.go b/client/go/cmd/root.go
index 1723f2cfa80..84285d546ea 100644
--- a/client/go/cmd/root.go
+++ b/client/go/cmd/root.go
@@ -19,7 +19,13 @@ var (
// TODO: add flag to show http request made
rootCmd = &cobra.Command{
Use: "vespa <command>",
- Short: "The command-line tool for Vespa",
+ Short: "The command-line tool for Vespa.ai",
+ Long: `The command-line tool for Vespa.ai.
+
+Use it on Vespa instances running locally, remotely or in the cloud.
+Prefer web service API's to this in production.
+
+Vespa documentation: https://docs.vespa.ai`,
}
color aurora.Aurora
targetArg string
diff --git a/client/go/cmd/status.go b/client/go/cmd/status.go
index 92e86573198..bc351d336d1 100644
--- a/client/go/cmd/status.go
+++ b/client/go/cmd/status.go
@@ -19,36 +19,40 @@ func init() {
}
var statusCmd = &cobra.Command{
- Use: "status",
- Short: "Verify that a Vespa target is ready to use (query by default)",
- Args: cobra.MaximumNArgs(1),
+ Use: "status",
+ Short: "Verify that a service is ready to use (query by default)",
+ Example: `$ vespa status query`,
+ Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
status(queryTarget(), "Query API")
},
}
var statusQueryCmd = &cobra.Command{
- Use: "query",
- Short: "Verify that your Vespa query API container endpoint is ready (default)",
- Args: cobra.ExactArgs(0),
+ Use: "query",
+ Short: "Verify that the query service is ready to use (default)",
+ Example: `$ vespa status query`,
+ Args: cobra.ExactArgs(0),
Run: func(cmd *cobra.Command, args []string) {
status(queryTarget(), "Query API")
},
}
var statusDocumentCmd = &cobra.Command{
- Use: "document",
- Short: "Verify that your Vespa document API container endpoint is ready",
- Args: cobra.ExactArgs(0),
+ Use: "document",
+ Short: "Verify that the document service is ready to use",
+ Example: `$ vespa status document`,
+ Args: cobra.ExactArgs(0),
Run: func(cmd *cobra.Command, args []string) {
status(documentTarget(), "Document API")
},
}
var statusDeployCmd = &cobra.Command{
- Use: "deploy",
- Short: "Verify that your Vespa deploy API config server endpoint is ready",
- Args: cobra.ExactArgs(0),
+ Use: "deploy",
+ Short: "Verify that the deploy service is ready to use",
+ Example: `$ vespa status deploy`,
+ Args: cobra.ExactArgs(0),
Run: func(cmd *cobra.Command, args []string) {
status(deployTarget(), "Deploy API")
},
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/SearchBuilder.java b/config-model/src/main/java/com/yahoo/searchdefinition/SearchBuilder.java
index 625c584f79a..f49a477c66b 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/SearchBuilder.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/SearchBuilder.java
@@ -527,5 +527,7 @@ public class SearchBuilder {
public QueryProfileRegistry getQueryProfileRegistry() {
return queryProfileRegistry;
}
+ public ModelContext.Properties getProperties() { return properties; }
+ public DeployLogger getDeployLogger() { return deployLogger; }
}