In my query I want to sort results. My request doesn't generate error but "sort" doesn't work.
...[sort] => Array
(
[0] => Array
(
[field_title] => Array
(
[order] => asc
)
)
)...
I work with Drupal, my index is already create. I think that I miss a mapping. But I don't know how to create a "mapping" so that "sort" works. In the elasticsearch.yml file? How?
ElasticSearch ignores unmapped field when sorting. Just try to add a mapping for the title_field
By default, the search request will fail if there is no mapping associated with a field.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.