I browse to curl -XGET 'http://localhost:9200/<index_name>/_mappings
and it returns the fields in an index.
This is one of the field.
{"dob" : { "type": "string", "analyzer" : "my_custom_analyzer"}}
With above response, does this mean DOB field is by default indexed? or index: true
has to be explicitly there for this field to be indexed?
CodePudding user response:
It seems you're using a very old version of Elasticsearch, likely 2.x or earlier.
However, based on the mapping you've shared, string
fields are indexed by default, in your case, dob
is analyzed by a custom analyzer called my_custom_analyzer
and the resulting tokens will be indexed automatically.