add search keyword checking for lattice/model, and some bug fix
on the middle of document for lattice/model