This is probably just a date format problem, nothing to do with the IF() statement. Try applying this on your date: DATE_FORMAT(yourDate, '%Y-%m-%dT00:00:00Z')
Ephraim Ofir -----Original Message----- From: Pawan Darira [mailto:pawan.dar...@gmail.com] Sent: Tuesday, October 26, 2010 12:26 PM To: solr-user@lucene.apache.org Subject: Re: How to index on basis of a condition? I am using mysql database, and, field type is "date" On Tue, Oct 26, 2010 at 2:56 PM, Gora Mohanty <g...@mimirtech.com> wrote: > On Tue, Oct 26, 2010 at 2:37 PM, Pawan Darira <pawan.dar...@gmail.com> > wrote: > > Thanks Mr. Ephraim Ofir. I used the SELECT IF() for my requirement. The > > query result is correct. But when i see it in my index, the value stored > is > > something unusual bunch of characters e.g. "*...@6628ad5a"* > [...] > > Which database are you indexing from? The field type is probably > a blob in the database. Check that, and look into the ClobTransformer: > http://wiki.apache.org/solr/DataImportHandler#ClobTransformer > > Regards, > Gora > -- Thanks, Pawan Darira