0

My SOLR is used to store events.
Events can repeat.
I need to filter my query to fetch events in a certain date range.

Data for example:
Event A has repeats in the following dates 1st, 10th, 15th, 29th
Event B has repeats in the following dates 2nd, 11th, 14th, 19th
Event C has repeats in the following dates 4th and 25th.

I want all event that occur in between the 7th and 12th Result: event A and event B
Lets assume the field name is multivalued=true
Its type is

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

How would the url/query look like?

Stefan
  • 2,028
  • 2
  • 36
  • 53
Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278
  • Thanks-that is what I figured. Migth as well put is as an answer and I'll accept it. This is a search system, and just one of the various filters on the search result is what is above. The most important one though is a keyword search, -> SOLR/Lucene – Itay Moav -Malimovka Apr 03 '12 at 22:39
  • Moved the comment to the answer. – Marko Topolnik Apr 04 '12 at 07:19

1 Answers1

1

I'd say Lucene index is really not the tool to use for this kind of task, but if there is some reason you must use it, I'd suggest making a distinct document for every pair (event, date) instead of multivalued fields. Then you won't have a problem formulating a query.

Marko Topolnik
  • 195,646
  • 29
  • 319
  • 436