You can use the below command to rebuild the buckets, from the raw data file alone.
You can use the fsck command on the indexers to repair them as well.
$plunk_home/bin/splunk fsck repair --all-buckets-all-indexes
his will rebuild hot/warm/cold in all indexes.
If you require it in a single index, then you can use the below command.
$plunk_home/bin/splunk fsck repair --all-buckets-one-index --index-name=
Below is the document which will help you to understand better.
Splunk built-in "rebuild" command is for single bucket. The indexer automatically deletes the old index and metadata files and rebuilds them. You don't need to delete any files yourself.
You can use the below command to rebuild a single bucket
splunk rebuild (name of the bucket directory)
Refer the below link for more details regarding the same.