I has mapping:
{ "properties":{ /*some fields ommited*/, "properties":{ "type":"nested", "properties":{ "FieldA":{ "type":"string", "fields":{ "raw":{ "index":"not_analyzed", "type":"string" } } } } } } }
and some documents:
{ /*some fields ommited*/, "properties":{ "FieldA":"one" } } { /*some fields ommited*/, "properties":{ "FieldA":"two" } }
and so on.
I try to make query:
{ "query": { "nested": { "query": { "term": { "FieldA.raw": "one" } }, "path": "properties" } } }
There are no results found. If i try to use the same query by field with other type (not string, and without raw subfield) it works. How should i write query for that case? Thanks!
P.S. field "FieldA" has subfield raw because i need this field to be analyzed and not analyzed at the same time