--- On Thu, 5/5/11, Marc SCHNEIDER <marc.schneide...@gmail.com> wrote:

> From: Marc SCHNEIDER <marc.schneide...@gmail.com>
> Subject: Format date before indexing it
> To: "solr-user" <solr-user@lucene.apache.org>
> Date: Thursday, May 5, 2011, 12:51 PM
> Hi,
> 
> I have to index records that have fields containing date.
> This date can be : "2011", "2011-05", "2015-05-01".
> Trailing characters also
> can be slashes.
> I'd like to convert theses values into a valid date for
> Solr.
> 
> So my question is : what is the best way to achieve this?
> 1) Use solr.DateField and make my own filter to that I get
> the date in the
> right format
> 2) Subclass solr.DateField ?

http://wiki.apache.org/solr/UpdateRequestProcessor 
or 
http://wiki.apache.org/solr/DataImportHandler#Transformer if you are using DIH.

Reply via email to