Answer the question
In order to leave comments, you need to log in
How to get the value of fields field in Elasticsearch mapping?
There is such a mapping used for aggregation:
'mappings': {
'my_type': {
'properties': {
'brand': {
'type': 'string',
'fields': {
'keyword': {
'type': 'string'
}
}
}
}
}
}
Answer the question
In order to leave comments, you need to log in
You can't get it, you can only search for it. And from _sources you can only get the original brand field. Additional fields created by the elastic go directly to the Lucinian index as terms, in your case the value of the brand field will go there completely. But this field will not glow anywhere else. The value of this field cannot be torn out of the lyucine.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question