0

In my SOLR I keep events that repeats themselves.
So, event A has something a repeat on the 11th 12th and 29th
Event b has repeat on the 2nd and 15th
Event c has on the 12th and 29th

I want to fetch the events ordered by their dates, I want it to be ordered by the first date in the collection.
Expected result:

Event B  
      A
      C

The schema entry is

 <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>

 <field name="date_start" type="tdate" indexed="true" stored="true" required="false" multiValued="true"/>

What would bethe URL I would use?

Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278

1 Answers1

1

My solution, which googeling suggest to be the only simple one, is to copy the first date into a separate sortable field.

Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278
  • That's the only possible way. Starting with SOLR 3.x, sorting on multivalued fields throws an exception. With 1.x (particularly 1.4) it works, although the sorting may or may not be effective. I tried with copyfields, but you cannot copy from multivalue to single value – Fermin Silva Apr 09 '12 at 23:49
  • I do the copy in my app, before I populate (insert) into SOLR – Itay Moav -Malimovka Apr 10 '12 at 01:04