--- title: Limit the indexing process to a certain number of items slug: '2992' canonical_url: https://docs.coveo.com/en/2992/ collection: index-content source_format: adoc --- # Limit the indexing process to a certain number of items When you experience issues with a [source](https://docs.coveo.com/en/246/) containing many [items](https://docs.coveo.com/en/210/) or when you plan to create a large source, you may want to ensure that the configuration is adequate so that your source [rebuilds](https://docs.coveo.com/en/2712/) or builds without errors. However, since there are many items to process, the source rebuild may take several hours or days. To avoid waiting for the whole process to complete, you can use the `DocumentCountLimit` source parameter to have the rebuild stop after a certain number of items are [indexed](https://docs.coveo.com/en/204/). While it is useful when developing or troubleshooting a source configuration, the `DocumentCountLimit` parameter is meant to be applied temporarily since it prevents you from [refreshing](https://docs.coveo.com/en/2710/) or [rescanning](https://docs.coveo.com/en/2711/) the source. To limit a source rebuild to a certain number of items > **Important** > > All items that aren't indexed during this rebuild will be deleted. > For example, if you set the `DocumentCountLimit` parameter `50` items, the rest of the source items would be deleted. > > Therefore, the `DocumentCountLimit` parameter should only be used for troubleshooting or development purposes in a [non-production Coveo organization](https://docs.coveo.com/en/2959/). . [Duplicate the source](https://docs.coveo.com/en/3390#duplicate-a-source) with which you experience issues. . Set the source's [**Content security** parameter](https://docs.coveo.com/en/1779/) to **Specific users and groups** and apply a tentative fix. . Save the source configuration. . [Edit the source JSON configuration](https://docs.coveo.com/en/1685/) to add the `DocumentCountLimit` parameter in the `parameters` section with the following JSON configuration: ```json "DocumentCountLimit": { "Value": <1> } ``` <1> Replace `` with the desired number. . Click **Save and rebuild** to launch the indexing process. The operation will take place until the number of indexed items is reached. Then, the rebuild operation stops. > **Note** > > The actual number of indexed items may be slightly different from the value you specified. > However, the difference should be minor. . Once your fix works, apply it to the original source. . When you're ready to start indexing all source items, delete the `DocumentCountLimit` object from the source JSON configuration, and then rebuild the source.