How to sort by LocalDateTime

Actually, I just noticed there are multiple activities, and thus multiple “startDateTime”, per indexed entity.

This just won’t work in Hibernate Search 5, because Hibernate Search 5 only supports sorting on single-valued fields. There is no workaround.

You will have to upgrade to Hibernate Search 6, which does support sorting on multi-valued fields.

You will find an extensive migration guide from Hibernate Serach 5 to 6 here.