Expose CommonTermsQuery

Closes #2583