How to filter exact terms?

Hi,

I struggling to do the following

I want to match the product field exactly with product="abc" but not with any super string"abcd" or sub string "ab".The product field is already Not Analysed in elasticsearch.
How do I achieve this?

Syntax is field_name:"exact_value"

Even with an analyzed field, here is what happens when you filter just by a string without quotes:

Versus for a string with quotes:

Thanks for the reply. But how to get rid of something like "Winddows 8 ultimate".In your example."Windows 8" with quotes will show "Winddows 8 ultimate" also.I am not able to figure that out.I just want exact "Windows 8" not the super string "Winddows 8 ultimate"

If your field is analyzed, what you said above is true. If it's not analyzed, then only the exact copies should be retrieved (see below).

Thanks for the reply.
I guess I am doing something wrong.I am still getting all the items even if they are Not_Analyzed. Please see the settings

I am using this template for elasticsearch
file

I got the issue.I was passing Product="abc" instead of Product:abc.
Thanks for the reply.

1 Like

Great! Glad that worked :smile:

1 Like