to_tsvector() could as well return the character number or a byte pointer, I could see advantages for both. But the word number makes little sense to me.
Word number is used only in ranking functions. If you don't need a ranking than you could safely strip positional information.
-- Teodor Sigaev E-mail: teodor@xxxxxxxxx WWW: http://www.sigaev.ru/