[JIRA] (HSEARCH-3103) Sorts on multi-valued fields
by Waldemar Kłaczyński (JIRA)
Waldemar Kłaczyński ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *commented* on HSEARCH-3103 ( https://hibernate.atlassian.net/browse/HSEARCH-3103?atlOrigin=eyJpIjoiMzg... )
Re: Sorts on multi-valued fields ( https://hibernate.atlassian.net/browse/HSEARCH-3103?atlOrigin=eyJpIjoiMzg... )
Maybe to speed up sorting, you can save in the field definition how it should behave when storing values. So eventually he would remember only one field, max, min, avg, etc ... Later sorting would consist of reading only one field. It would be a good solution in a flat model. This would speed up document search.
Indexing the field in such a way would prevent you from choosing a different aggregation method, but it is not always necessary for everyone. So the user would decide between search performance and subsequent dynamic search capability.
@GenericField(name = "bruttoPrice_sort" , sortable = Sortable.YES, mode = MultiValue.AVG)
The user would have to choose whether to remember the calculated value or to calculate it during sorting.
As for calculating values, median counting for nested multiple values is inefficient. This requires creating an array with the number of nested value elements in order to sort it. So calculating values when creating an index would be the solution here. Some functions, especially those that pull values up to aggregation, can be simplified for multiple nested values. So that he doesn't use ArrayList.
( https://hibernate.atlassian.net/browse/HSEARCH-3103#add-comment?atlOrigin... ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3103#add-comment?atlOrigin... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100121- sha1:db27712 )