On 21 April 2012 09:12, Bill Bell <billnb...@gmail.com> wrote: > We are loading a long (number of seconds since 1970?) value into Solr using > java and Solrj. What is the best way to convert this into the right Solr date > fields? [...]
There are various options, depending on the source of your data, and how you are indexing the field into Solr: * If you are fetching the no. of seconds from a database, most DBs will have date-conversion functions that you can use in the SELECT statement. * If you are using SolrJ, java.sql.Date has a constructor from milli-seconds since the Unix epoch. * If you are using DIH, you can use a transformer to convert the number of seconds to a date. Regards, Gora