Text query search in a document