the results will be in the order of event1, event3, event2. As long as at least one of the datestamps is later than 2018-05-01, event2 will match, but then when dealing with sorting, XPath uses the oldest date/timestamp to sort. Is it possible to use the latest date to sort when dealing with descending?
First of all, the property "datestamps" is not a jcr property, but a customized one, we do not need to have a leading "jcr:" in our case. "datestamps" is a string array holding all dates for the same event. As in our example, there could be an event lasting for a few months. This is a problem to construct a meaningful query because the oldest date is always used when the order is in descending.
By the way, "desc" doesn't work in our case. We are running 6.0, Jackrabbit Oak 1.0.22.