FAQ: I want to rebuild the search index in a batch process
## Answer
Please execute the API for "[Rebuild Search Indexes](/en/manual/api-rebuild-search-indexes)".
---
## Overview
"Search index" may not be created for data registered by batch processing, etc. In that case, you need to execute "「Rebuild Search Index」" from the screen, but you can rebuild the index by executing the "[Rebuild Search Indexes](/en/manual/api-rebuild-search-indexes)" API within the batch processing.
## Prerequisites
1. "Enabled" in the parameter "[BackgroundTask.json](/en/manual/background-task-json)" must be set to true.
## Operation
1. Execute the "[Rebuild Search Indexes](/en/manual/api-rebuild-search-indexes)" API within the batch processing.
## Script Example
Execute the search index rebuild API in PowerShell.
#### PowerShell
```
$params = @{
"ApiVersion": 1.1;
"ApiKey": "xxxxx...";
}
$response = Invoke-RestMethod -Uri http://{server name}/api/BackgroundTasks/{site ID}/RebuildSearchIndexes -Method POST -Body ($params|ConvertTo-Json) -ContentType "application/json";
```
※Edit the {server name} and {site ID} parts as appropriate to suit your environment.
## Related Information
<div id="ManualList"><ul><li><a href="/en/manual/background-task-json">Set Parameter: BackgroundTask.json</a><span>08.13.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/api-rebuild-search-indexes">Developer Function: API: Site Operation: Search Index Rebuild</a><span>08.14.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />