Skip to content

Configuring Marqo

Marqo is configured through environment variables passed to the Marqo container when it is run.

Configuring usage limits

Limits can be set to protect the resources of the machine Marqo is running on.

Configuration name Default Description
MARQO_MAX_INDEX_FIELDS n/a Maximum number of fields allowed per index
MARQO_MAX_DOC_BYTES 100000 Maximum document size allowed to be indexed
MARQO_MAX_RETRIEVABLE_DOCS n/a Maximum number of documents allowed to be returned in a single request

Example

docker run --name marqo --privileged -p 8882:8882 --add-host host.docker.internal:host-gateway \
    -e "MARQO_MAX_INDEX_FIELDS=400" \
    -e "MARQO_MAX_DOC_BYTES=200000" \
    -e "MARQO_MAX_RETRIEVABLE_DOCS=600" marqoai/marqo:0.0.8
In the above example a marqo container is being run with the following limits:

  • The max number of fields per index is capped at 400

  • The max size of an indexed document is 0.2mb

  • The max number of documents allowed to be returned in a single request is 600

Configuring preloaded models

  • Variable: MARQO_MODELS_TO_PRELOAD

  • Default value: '["hf/all_datasets_v4_MiniLM-L6", "ViT-L/14"]'

  • Expected value: A JSON-encoded array of strings.

These models will load as Marqo starts. This prevents a delay during initial search and index commands after Marqo starts. Read about what models you can load here

Example

docker run --name marqo --privileged -p 8882:8882 --add-host host.docker.internal:host-gateway \
    -e MARQO_MODELS_TO_PRELOAD='["sentence-transformers/stsb-xlm-r-multilingual", "onnx/all-MiniLM-L6-v1"]' \
    marqoai/marqo:0.0.8