Use the SearchAfter feature for paginated queries on Elasticsearch
Description
Activity
Show:
Yoann Rodière March 20, 2024 at 8:33 AM
To implement this feature, we would ideally need a way to convert field values to and from a string, so that users can take “sort values” from a query, and serialize/deserialize them as necessary in the frontend.
Note that the beginning of what we’d need was implemented as part of : we now have the ability, for a given field, to parse a string to a value of the field type. We’d just need the opposite operation (formatting to string) and we’d be all set.
Yoann Rodière March 20, 2024 at 8:29 AM
Interestingly, a similar feature has been added to ORM 6.5 with org.hibernate.query.SelectionQuery#getKeyedResultList
. We might want to integrate with it in HibernateOrmSearchQueryAdapter
if possible (but I suspect the feature’s reliance on the JPA metamodel will prevent us from doing so).
Assignee
Reporter
Yoann Rodière
Yoann RodièreComponents
Priority
Created February 22, 2017 at 8:04 AM
Updated January 8, 2025 at 3:29 PM
See