I have the following Elastic Search query with only a term filter. My query is much more complex but I am just trying to show the issue here.
{
\"filter\
Based on the answer by @imotov If you're using spring-data-elasticsearch then all you need to do is mark your field as:
@Field(type = FieldType.String, index = FieldIndex.not_analyzed)
instead of
@Field(type = FieldType.String)
The problem is you need to drop the index though and re-instantiate it with new mappings.