build TermQuery.