留言板

How to use ElasticSearch sort modes (for multi-valued fields)

thumbnail
Benjamin Bini,修改在7 年前。

How to use ElasticSearch sort modes (for multi-valued fields)

Junior Member 帖子: 31 加入日期: 13-5-24 最近的帖子
Hi,

I use ElasticSearch for searching some custom entities in my Liferay 7 instance. Some of them have mutlivalued fields indexed.

I saw here : https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_sort_mode_option
that you can sort your search results by any mutlivalued field and chose the behavior of the sorting (use the min value of the array, the average, the median or the max).

How to use this feature in Liferay? Is it even possible?

I use the SortFactoryUtil to create a Sort object, but it does not contain any "mode" property.

Thank you
thumbnail
Benjamin Bini,修改在7 年前。

RE: How to use ElasticSearch sort modes (for multi-valued fields)

Junior Member 帖子: 31 加入日期: 13-5-24 最近的帖子
Let me bump this thread