Multi-field for _all

I have a requirement where I want to analyze _all with different analyzers. So I want to go with multi-filed feature.
I am not able to . I am getting exception in runtime not while creating mappings:
! org.elasticsearch.ElasticsearchException: Exception while querying elastic search {"root_cause":[{"type":"illegal_argument_exception","reason":"no mapping found for field [_all.suggestion_source]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"design","node":"naPqjgY6R56KSRg5HjO0LQ","reason":{"type":"illegal_argument_exception","reason":"no mapping found for field [_all.suggestion_source]"}}],"caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [_all.suggestion_source]"}}

my mappings :
"_all": {
"type": "string",
"analyzer": "all_field_analyzer",
"fields": {
"suggestion_source": {
"type": "string",
"analyzer": "phrase_suggester_analyzer"
}
}
}
If anyone can tell me if this is possible or not because no where it is mentioned explicitly if it can be done or not

_all field is going to be removed anyway.

Use for that need the copy_to feature and copy fields you want to your own my_all field. Then add any subfield (multi field) you want.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.