Skip to main content
Usage
algolia rules import <index> -F <file> [flags]

Examples

Import rules from the โ€œrules.ndjsonโ€ file to the โ€œMOVIESโ€ index:
algolia rules import MOVIES -F rules.ndjson
Import rules from the standard input to the โ€œMOVIESโ€ index:
cat rules.ndjson | algolia rules import MOVIES -F -
Browse the rules in the โ€œSERIESโ€ index and import them to the โ€œMOVIESโ€ index:
algolia rules browse SERIES | algolia rules import MOVIES -F -
Import rules from the โ€œrules.ndjsonโ€ file to the โ€œMOVIESโ€ index and donโ€™t forward them to the index replicas:
algolia rules import MOVIES -F rules.ndjson -f=false

Flags

-c, --clear-existing-rules
Delete existing rules before importing new ones
-y, --confirm
Skip the confirmation prompt.
-F, --file
Import rules from a file (use โ€-โ€ to read from standard input)
-f, --forward-to-replicas
Whether to add the rules to replica indices
-w, --wait
wait for the operation to complete
โŒ˜I