VESPA-QUERY(1)

NAME

vespa-query - Issue a query to Vespa

SYNOPSIS

vespa query query-parameters [flags]

DESCRIPTION

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].

OPTIONS

--file=""
    Read query parameters from the given JSON file and send a POST request, with overrides from arguments

--format="human"
    Output format. Must be 'human' (human-readable) or 'plain' (no formatting)

--header=[]
    Add a header to the HTTP request, on the format 'Header: Value'. This can be specified multiple times

-h, --help[=false]
    help for query

-T, --timeout=10
    Timeout for the query in seconds

-v, --verbose[=false]
    Print the equivalent curl command for the query

-w, --wait=0
    Number of seconds to wait for service(s) to become ready. 0 to disable (default 0)

OPTIONS INHERITED FROM PARENT COMMANDS

-a, --application=""
    The application to use (cloud only). Format "tenant.application.instance" - instance is optional

-C, --cluster=""
    The container cluster to use. This is only required for applications with multiple clusters

-c, --color="auto"
    Whether to use colors in output. Must be "auto", "never", or "always"

-i, --instance=""
    The instance of the application to use (cloud only)

-q, --quiet[=false]
    Print only errors

-t, --target="local"
    The target platform to use. Must be "local", "cloud", "hosted" or an URL

-z, --zone=""
    The zone to use. This defaults to a dev zone (cloud only)

EXAMPLE
    $ vespa query "yql=select * from music where album contains 'head'" hits=5
    $ vespa query --format=plain "yql=select * from music where album contains 'head'" hits=5
    $ vespa query --header="X-First-Name: Joe" "yql=select * from music where album contains 'head'" hits=5

SEE ALSO

vespa(1)