On Fri, Mar 27, 2009 at 8:17 PM, Giovanni De Stefano < giovanni.destef...@gmail.com> wrote:
> Hello, > > I am having a problem indexing a date field. > > In my schema the date field is defined the standard way: > > <fieldType name="date" class="solr.DateField" sortMissingLast="true" > omitNorms="true"/> > > I know the Solr format is 1995-12-31T23:59:59Z, but the dates coming from > my > "sources" are in the format 2009-04-10T02:02:55+0200 > > How can I make the conversion? > If you are using Solrj then parse it into a Date object and add it. Solrj will take care of writing it out in the correct format. If you are using DataImportHandler then use the DateFormatTransformer. -- Regards, Shalin Shekhar Mangar.