jina client

Note

This command is hidden unless you set JINA_FULL_CLI

Start a Python client that connects to a remote Jina gateway

usage: jina client [-h] [--request-size]
                   [--mode {INDEX, SEARCH, DELETE, UPDATE ... 3 more choices}]
                   [--top-k] [--mime-type] [--continue-on-error]
                   [--return-results] [--max-message-size] [--proxy]
                   [--prefetch] [--prefetch-on-recv] [--restful]
                   [--compress {NONE, LZ4, ZLIB, GZIP ... 2 more choices}]
                   [--compress-min-bytes] [--compress-min-ratio] [--host]
                   [--port-expose]

Client arguments

--request-size

The number of Documents in each Request.

Default: 100

--mode

Possible choices: INDEX, SEARCH, DELETE, UPDATE, CONTROL, TRAIN, DUMP

The Request mode. This applies to all Requests sent from this client.

  • INDEX: store new Documents into the system

  • SEARCH: query Documents from an indexed system

  • UPDATE: update existing Documents in an indexed system

  • DELETE: delete existing Documents from an indexed system

  • CONTROL: (advance) control Pea/Pod such as shutdown, status

  • TRAIN: (experimental) train the system

--top-k

At maximum k results are returned.

--mime-type

MIME type of the input Documents.

--continue-on-error

If set, a Request that causes error will be logged only without blocking the further requests.

Default: False

--return-results

This feature is only used for AsyncClient.

If set, the results of all Requests will be returned as a list. This is useful when one wants process Responses in bulk instead of using callback.

Default: False

GRPC/REST arguments

--max-message-size

The maximum send and receive size for gRPC server in bytes, -1 means unlimited

Default: -1

--proxy

If set, respect the http_proxy and https_proxy environment variables. otherwise, it will unset these proxy variables before start. gRPC seems to prefer no proxy

Default: False

--prefetch

The number of pre-fetched requests from the client

Default: 50

--prefetch-on-recv

The number of additional requests to fetch on every receive

Default: 1

--restful, --rest-api

If set, use RESTful interface instead of gRPC as the main interface

Default: False

--compress

Possible choices: NONE, LZ4, ZLIB, GZIP, BZ2, LZMA

The compress algorithm used over the entire Flow.

Note that this is not necessarily effective, it depends on the settings of –compress-lwm and compress-hwm

Default: LZ4

--compress-min-bytes

The original message size must be larger than this number to trigger the compress algorithm, -1 means disable compression.

Default: 1024

--compress-min-ratio

The compression ratio (uncompressed_size/compressed_size) must be higher than this number to trigger the compress algorithm.

Default: 1.1

Expose arguments

--host

The host address of the runtime, by default it is 0.0.0.0.

Default: “0.0.0.0”

--port-expose

The port of the host exposed to the public

Default: 51951