Add some ideas in the comments (see todo tags)
Use LazyDoc to only load doc data when necessary
Ignore one-letter words
Add type,size,from,to columns to doc table
Use a ResultSet to provide pages of results