refactor array to_sensei method to use TermsQuery