Use a field filter instead of terms filter so that analysis is done on the value. Closes #1166. Closes #1142