I had this same issue - There are constants in RedBean_QueryWriter that I added to fix this:
I added:
const C_DATATYPE_TEXTUTF8 = 7;
Then under the constructor in the typeno_sqltype array I added:
RedBean_QueryWriter_MySQL::C_DATATYPE_TEXTUTF8 => ' VARCHAR(191) ',
And under the "scanType" function I added:
if ( mb_strlen( $value, 'UTF-8' ) <= 191 ) {
return RedBean_QueryWriter_MySQL::C_DATATYPE_TEXTUTF8;
}
... and indexing appeared to work just fine after I did those changes.
However, this only works if the varchar is less than 191 UTF8 chars.