fix text query prefix length bug