Configure Index Settings
Control how an index runs and which files it processes. Turn on GPU acceleration, pin a Haystack version, filter files by name prefix
About This Task
Most index settings can be changed only while the index is disabled, because an enabled index is read-only. Disable the index first, change the setting, and enable the index again. For details, see Edit an Index.
The indexing pod size
Enable GPU Acceleration
By default, indexes run on CPU. You can enable GPU acceleration for an index to speed it up. This is especially useful for pipelines that include components that run faster on a GPU, like DoclingConverter or SentenceTransformersDocumentEmbedder.
When you enable GPU acceleration, the index checks whether a component needs a GPU and assigns one automatically. GPUs are only used when required and are not reserved for the entire index processing.
If GPU acceleration is disabled and your index includes components that rely on a GPU, those components run on the CPU instead. This can slow down processing and may cause timeouts, especially for larger or more complex indexes.
To enable GPU acceleration:
- Go to Indexes and click the index you want to enable GPU acceleration for. This opens the Builder.
- Open the Settings tab and click the GPU Acceleration toggle to turn it on.
If your index needs more CPU or memory rather than a GPU, for example to convert large files, set a larger indexing pod size. For details, see Set the Indexing Instance Size in Index Settings.
Pin a Haystack Version
By default, an index runs on the Haystack version that Haystack Platform provides. To use a specific haystack-ai 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.
The index must be disabled.
-
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.
On the Index Details page, check the processed files to confirm your files were indexed.
To remove the pin, delete the dependencies block from a disabled index and enable it again. The index then runs on the version Haystack Platform provides.
Choose Files to Index
By default, an index processes all files in your workspace. You can restrict indexing to a subset of those files:
- By file name prefix: Index only files whose names start with one of the prefixes you set. For example,
legal*matcheslegal-contract.pdfandlegal_memo.docx.
- By metadata: Index only files whose metadata matches a condition you set. For example, index files where
category == reports.
Only files that match your filters are indexed, counted, and listed on the Index Files tab. All other files are skipped.
You can use both filters at the same time. When both are set, a file must match the prefix filter and the metadata filter to be indexed.
You can update these filters only while the index is disabled. Disable the index first, then change the filters. Changing the filter does not re-index files that were already indexed.
Changing a file's metadata after it was already indexed does not automatically re-index that file.
To filter by metadata, your files need metadata first. For details, see Add Metadata to Your Files.
Set a File Name Prefix Filter
- In Haystack Enterprise Platform, go to Indexes and click the index you want to configure. This opens the Index in Builder.
- Open the Settings tab.
- In the File Name Prefix Filter section, type one or more prefixes in the Prefixes field.
- Separate multiple prefixes with commas. A file is indexed if its name matches any of the prefixes.
- You can end a prefix with
*as a wildcard, for exampledoc*orcontracts/. - Each prefix can include letters, digits,
.,_,-, and/.
Clear the File Name Prefix Filter
- Open the Settings tab for the disabled index.
- Clear the Prefixes field in the File Name Prefix Filter section.
Set a File Name Prefix Filter with the API
To set or clear the prefix filter with the REST API, see Filter Files to Index with the REST API.
Set a Metadata Filter in the UI
The File Meta Filter in the UI uses one equality condition: you specify a metadata field name and a value, and only files where that field equals that value are indexed. Files without that field, or with a different value, are skipped.
- In Haystack Enterprise Platform, go to Indexes and click the index you want to configure. This opens the Index in Builder.
- Open the Settings tab.
- In the File Meta Filter section, type the metadata field name in the first field. For example,
category. - The operator is fixed to
==(equals). - Type the value to match in the second field. For example,
reports. - Click Save.
The index now processes only files whose metadata field matches the value you entered.
Clear the File Meta Filter
To remove the filter and index all files again:
- Open the Settings tab for the disabled index.
- In the File Meta Filter section, clear both the field name and the value fields.
The filter applies to file metadata, not to file content. Add the relevant metadata to your files before you enable the index. For details, see Add Metadata to Your Files.
In the UI you can set one metadata rule at a time, and the operator is always ==. To use != or combine several conditions, set the filter with the REST API.
Set a Metadata Filter with the API
To set or clear the metadata filter with the REST API, see Filter Files to Index with the REST API.
Set the Indexing Instance Size in Index Settings
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, choose a larger instance size in the index settings.
The Instance size list shows only the sizes your organization has made available. An organization admin makes sizes available in Settings > Organization > Compute. For steps, see Managing Compute Settings.
If an admin turned off the size your index already uses, that size still appears in the list, so the index keeps showing its current size. You can keep it or switch to an enabled size. While an index has an instance size set, deployed or not, an organization admin can't turn that size off. To free the size, switch the index to another size, or reset it to the default pod 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.
Each option in Instance size shows its compute. An index gets a CPU request and a memory limit:
- Small: 0.4+ vCPU, 4 GiB memory
- Medium: 0.9+ vCPU, 8 GiB memory
- Large: 1.7+ vCPU, 16 GiB memory
- Extra large: 3.5+ vCPU, 32 GiB memory
The + means indexing can use more CPU when it's free. Memory is a hard limit. The same size name gives a service replica different compute. For example, Medium is 1 vCPU and 4 GiB memory for a service. For details, see Create a Service.
To change the instance size:
- Log in to Haystack Enterprise Platform and open Indexes.
- Click the index name and open the index settings.
- In Instance size, select the size you want. You need permission to edit indexes to change it. While the list is loading, it shows only the index's current size.
To check a size's memory limit before you save, look at the line under the Instance size list. It shows the limit of the selected size, for example, "Medium: 8 GiB memory," and updates when you select another size. If indexing runs out of memory on large files, which shows up as pod restarts or out-of-memory errors, pick a bigger size.
If the index is deployed, it restarts its indexing pods on the new size. Files that are already indexed aren't reprocessed. The size doesn't change how many credits the index uses.
To find out whether your index needs a different size, open the index's Metrics tab. The CPU and memory charts show the limit of the current size, and the advice card recommends a size change when usage is close to the limit. For details, see Check Index Hardware Metrics.
Limit the Batch Size of an Index
An indexing pipeline processes files in batches. If an index handles heavy files, such as large documents that need OCR or LLM enrichment, a batch can take longer than the queue timeout allows, and the files get retried. Lower the maximum batch size to make batches smaller and reduce the chance of retries. If you leave the maximum batch size unset, the index uses the platform default.
The value must be between 1 and 500. You can change it while the index is enabled or disabled. On an enabled index, the new value applies the next time the indexing pod is deployed.
Set the Maximum Batch Size in Index Settings
- Log in to Haystack Enterprise Platform and open Indexes.
- Click the index name and open the index settings.
- In the Max allowed batch size section, enter a number from 1 to 500 in the Max batch size field. You need permission to edit indexes to change it.
- Press Enter or click outside the field to save the value.
To go back to the platform default, clear the field and click outside it.
Set the Maximum Batch Size with the API
Set the batch size with the max_allowed_batch_size parameter of the Update Index API endpoint. It accepts an integer from 1 to 500, or null to reset to the platform default. If you leave the parameter out of a request, the current value stays as it is. A value outside the range returns a 422 error. Send an integer from 1 to 500, or null.
The index response returns null when no value is set. For the full request and response schema, see the Update Index endpoint.
To find out whether batches are too large, check the throughput averages on the index's Metrics tab. See Read the Indexing Throughput Averages.
Set the Queue Length per Replica
An index adds replicas as its queue of files grows, up to the Max replicas you set. The queue length per replica is the number of queued files that one replica handles before another replica is added. Lower the value if a slow pipeline, for example one with OCR or LLM enrichment, takes too long on a small queue. A lower value scales out sooner, so more replicas start working on the same queue. The number of replicas never goes above Max replicas, so a low value has no effect if that limit is already reached.
The value must be a whole number from 1 to 1500. An empty field uses the default of 1500.
To set the queue length per replica:
- In Haystack Enterprise Platform, go to Indexes and click the index you want to configure. This opens the Index in Builder.
- Open the Settings tab.
- In the Queue Length per Replica section, type a value in the Queue length per replica field. The value is saved when you leave the field or press Enter.
To go back to the default, clear the field. The field then shows 1500 (default).
To confirm the value was saved, leave the field and reopen the Settings tab. The field shows your value.
What To Do Next
After you change the settings, enable the index so it applies them. Wait until indexing finishes before you run queries.
Related Information
Was this page helpful?