adjustments to the term query

based on
https://github.com/jeremyBass/Connections/commit/a42814d691ddc5478875e3abf4776466d06f6675#commitcomment-5064296
change was made.  Now accounts for all possible combinations of orderby
and order in both types of string and array