Configure the index batch size for Azure AI Search targets

With Azure AI Search targets, you can configure the index batch size to specify the number of documents that you want to send to your index in a single index request. Larger batch sizes can improve indexing throughput by reducing the number of API calls, while smaller batches help manage memory consumption and reduce the impact of individual failures. Adjusting the batch size setting allows you to optimize indexing behavior based on your data volume, network capacity, and service limits.

For example, imagine you have a content source containing 10,000 documents. Configuring a batch size of 1000 allows you to send documents to your search index in 10 batch requests. Additionally, if you have configured other BA insight features, such as document chunking to your indexed content, the total number of items sent per batch increases accordingly. Thus, batch sizing allows you exercise an amount of control over your indexed items.

Limitations

  • The Azure AI Search document limit per indexing API request payload 16 megabytes. That payload can be a single document, or a batch of documents. For a batch with a single document, the maximum document size is 16 MB of JSON. For more information on Azure AI Search service limits, see Service limits in Azure AI Search.

Prerequisites

  • If you are upgrading to Connectivity Hub 4.3 and using existing content sources with Azure AI Search targets, you will receive an "Exception has been thrown by the target of an invocation - Object Reference not set to an instance of an object." error when crawling these content sources. To fix this, you must do the following:

    1. Ensure that your list of metadata does not contain any warnings.

    2. Edit your content source and in the Target drop-down menu, temporarily change your Azure AI Search target to another target.

    3. In the Target drop-down menu, change back to your Azure AI Search Target.

    4. Click Save.

    5. On your content source, click the Target Specific tab and verify that you see a new setting for configuring the index batch size and configuring analyzers on this tab.

    6. Click Save.

Procedure

To configure your index batch size, do the following:

  1. In Connectivity Hub, click Content Sources.

  2. Select the Content Source for the Azure AI Search target that you want to specify batch sizing for.

  3. Click the Target Specific tab.

  4. In the Azure Indexing Batch Size field, specify the number of documents that you want to send to your index in each batch.

  5. Click Save Changes.

Recommended batch sizes

Upland BA Insight recommends that you only decrease the default value of 1000 if you experience indexing issues due to the size of your batch requests.