Simple Migration Question: Specifying a key length

Is there any way to create a key length for a text index using
add_index? Whenever I tree and create a text-based, rather than integer
based index, it aborts the rake because I did not specify a key length.
I looked at the add_index documentation, and can’t find a way to specify
this. How do I rectify this error:
Mysql::Error: BLOB/TEXT column ‘url’ used in key specification without a
key length: CREATE INDEX index_users_on_url ON user (url)