lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Connor" <>
Subject Best strategy for dates in solr-ruby
Date Mon, 11 Aug 2008 19:03:56 GMT

I originally used a Ruby Date class for my dates, but found when I set
the type to solr.DateField in the solrconfig.xml, it returned a parse
error. After that, I switched to Time and it worked fine.

However, I now have some dates that are out of the Time range (e.g.
1865) so Date would work better here than time.

What is the best strategy here:
1. Use Dates and treat it as a solr.String;
2. Customize the Date class to output a valid solr.DateField string; or
3. Treat it as a string in ruby and handle to/from Date in my model?


Ian Connor

View raw message