The case where there is just no data at all should probably be an exception and checked before this persist block. It is never "supposed" to happen given how the index generator job is set up, but in the event that it does occur, this condition will be false, so execution will fall through to mergeQueryableIndexes below which is kind of weird.