Term Filter

Hi,

Can I used analysed fields with term filter or only non-analysed?

Best Regards,

David.

Simple Answer

For a term filter to drive correct results the field usually needs to be
non-analyzed.

Full Answer

If you use a term filter on an analyzed field you would have to make sure
that you provide a correctly analyzed term to the filter. This can sometimes
make sense for fields that use a special analyzer that does not really do
language processing. For example, you could have an analyzer that simply
lowercases everything. You should be able to use a term filter on such a
field provided you would do the lowercasing of the filter term on your side.