Hello,
i've created an index like this:
{ "mappings":{ "doc":{ "properties":{ "json":{ "enabled":false, "type":"object" }, "string":{ "type":"string" } } } } }
and i put inside an object like this, type is users
{ "json":{ "surname":"surname", "name":"name" }, "string":"string" }
now i do a search like this:
{ "query":{ "match":{ "json.surname":"surname" } } }
and it works!. But, shouldn't the enabled=false
disable the possibility to search over it?
Whether the JSON value given for the object field should be parsed and indexed (true, default) or completely ignored (false).
The enabled setting, which can be applied only to the mapping type and to object fields, causes Elasticsearch to skip parsing of the contents of the field entirely. The JSON can still be retrieved from the _source field, but it is not searchable or stored in any other way: