I Have a Solr index that stores dates in a multivalued field for each document.
I need to have the ability to search for a date range (done that), but also sort the result set by date where the date is the first date of the multivalued field that falls within the range.
If I try to use a function for sorting it will tell me that it can not use the Field Caceh on multivalued fields.
Is it possible to maybe have a function fill a field on the query and then sort by that, or another option, or would the only option be to use a join, order by the join and then field collapse.
I really can't use SQL due to the complexity of the search and the number of joins, so was hoping there was a way I could complete this without falling back to SQL-like paradigms.