Pin a Haystack Version for an Index
Run an index on a specific haystack-ai version, with the extra packages it needs. Use this when your index needs a different Haystack version than the default or packages the default environment doesn't include.
About This Task
By default, an index runs on the Haystack version that Haystack Platform provides. To use a specific version or extra packages, add a top-level dependencies block to the index YAML. The index then processes your files in an isolated environment built from that block. The block works the same way in index YAML you create or update through the API. For details, see Pinning a Haystack Version for an Index.
Prerequisites
The index must be disabled. An enabled index is read-only. To change an enabled index, duplicate it or disable it first. For details, see Edit an Index.
Pin a Version
-
Log in to Haystack Enterprise Platform and open Indexes.
-
Click the name of the index you want to update and switch to Build.
-
In the index YAML, add a top-level
dependenciesblock. Pin thehaystack-aiversion with==and list any extra packages:dependencies:- haystack-ai==2.18.0- <extra-package> -
Save the index.
-
Enable the index. For details, see Enable an Index. When indexing starts, we validate the
dependenciesblock. -
Open the Index Details page and check the logs. If the block is invalid or empty, the indexing job fails right away with an error message that describes the problem, before any file is processed. Fix the block and enable the index again. If the block is valid, indexing continues and processes your files.
What To Do Next
- On the Index Details page, check the processed files to confirm your files were indexed.
- To remove the pin, delete the
dependenciesblock from a disabled index and enable it again. The index then runs on the version Haystack Platform provides.
Related Information
Was this page helpful?