Edit an Index
Update your index.
About This Task
You can update draft indexes that aren't enabled. Once an index is enabled, it becomes read-only. To make changes to an enabled index, you have two options:
- Duplicate the index, update the copy, and keep the original index enabled and unaffected. When you're ready, enable the updated copy and connect your pipelines to it. This way, you can switch without any downtime. We recommend this approach.
- Disable the index, which removes all associated indexing data and temporarily prevents any query pipelines from accessing it. With this approach, you must wait until the updated index is re-enabled and indexing is complete before running queries again.
The one exception is the size of the pod that indexes your files. You can change it through the API while the index is enabled. For details, see Set the Indexing Pod Size with the API.
If you open an enabled index in Pipeline Builder, a banner at the top says it's in view-only mode. This lock prevents accidental changes that could disrupt live pipelines, and an admin can't lift it. If you see the banner "Read-only. Contact your admin to get edit access." instead, you don't have permission to edit indexes. Ask your admin to change your permissions.
Edit an Index in Pipeline Builder
- Log in to Haystack Enterprise Platform and open Indexes.
- Find the index you want to update and make sure it's disabled.
- Click the index name and switch to Build. Here, you can update the index components and connections. To pin a Haystack version or add packages, see Pin a Haystack Version for an Index.
Duplicate an Index
Duplicating creates a copy of an index with its YAML configuration. Use this when you want to update an enabled index without downtime — duplicate it, update the copy, then enable the copy and connect your pipelines to it.
- Log in to Haystack Enterprise Platform and open Indexes.
- Find the index you want to copy, click More Actions next to it, and choose Duplicate.
- In the New pipeline name field, enter a name for the copy. The default name is
{source-name}-copy. - Click Duplicate.
You're taken to Pipeline Builder where you can edit the new index. If an index with the name you entered already exists, an inline error appears — enter a different name and try again.
Set the Indexing Pod Size with the API
The indexing pod converts your files, splits them into chunks, and writes them to the document store. If an index processes big files and indexing is slow or fails, give the pod more resources by setting a larger size. Set the size with the instance_size parameter of the Update Index API endpoint. You can change it while the index is enabled or disabled.
The instance_size parameter accepts these values:
smallmediumlargexlnull: Resets the index to the default pod size.
If you leave instance_size out of a request, the current size stays as it is.
A new size doesn't apply right away. The index keeps indexing with the old size until the next time its pod is deployed, and then it uses the new size.
Each size sets the memory limit of the indexing pod: small has 4 GiB, medium has 8 GiB, large has 16 GiB, and xl has 32 GiB. An index without a size uses the default of 8 GiB. To check whether the pod is close to running out of memory, compare its usage with this limit in the index metrics. If it's close, set a larger size. For details, see Check Index Hardware Metrics.
To set the size to large, send a PATCH request:
curl --request PATCH \
--url https://api.cloud.deepset.ai/api/v1/workspaces/<WORKSPACE_NAME>/indexes/<INDEX_NAME> \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{"instance_size": "large"}'
The response contains the index with "instance_size": "large". To go back to the default pod size, send {"instance_size": null}. An unknown value, such as huge, returns a 422 error.
For the full request and response schema, see the Update Index endpoint in the API reference.
What To Do Next
Once your index is updated, enable it and wait until indexing finishes.
Link your pipelines to the updated index. For details, see Edit a Pipeline.
Was this page helpful?