POST /v1/indexes/products_tmp/copy-settings-from 🔒 Bearer

Copy settings from another index

Mirror synonyms, ranking rules and search settings from an existing index. The building block for zero-downtime reindexing.

Copies non-document configuration from a source index onto the target. Use it when you've built a fresh temp index from scratch and want it to inherit all the tuning the live index has accumulated — synonyms, ranking rules, search-attribute weights, typo config, stop words.

This is the half of the zero-downtime reindex pattern that's invisible to your users.

# Path parameters

Name Type Description
name string The target index. This is the one being populated; its existing settings get replaced, not merged.

# Body parameters

Name Type Required Description
source_index string required The index whose settings to copy from.
copy string[] optional, default ["synonyms","ranking_rules","settings"] Pick a subset. settings covers typo_config, stop_words, search_attributes, relevance_config, no_results_behavior and the semantic-search defaults.

# Response

{
  "data": {
    "copied": {
      "synonyms": 12,
      "ranking_rules": 4,
      "settings": ["typo_config", "search_attributes", "relevance_config"]
    }
  }
}

Synonyms are synced to the search engine immediately so the target is queryable with the new map straight away.

# Behaviour notes

  • Idempotent. Re-running with the same source produces the same target state.
  • Atomic per resource. Synonyms are wiped + recreated inside a DB transaction. If anything fails, the target keeps its old synonyms.
  • Doesn't copy documents. This is settings only. Use batch upsert for the data.
  • Doesn't copy data-source configuration. Auto-sync feeds are wired up separately because credentials usually shouldn't be cloned.

# Errors

Status Code Reason
404 SK-SE-404 Either index name does not exist or your key cannot access it.
400 SK-SE-400 Invalid copy entry.
esc
POST /v1/indexes/products_tmp/copy-settings-from