The response will always be the full specification, so you'll have yyyy-MM-dd'T'HH:mm:ss format. If you want the user to just see the yyyy-MM-dd you could use a DocTransformer to change it on the way out.
You cannot change the way the dates are stored internally. The DateTransformer is just there to allow different inputs, it has no effect on the stored data at all. Best, Erick On Tue, Aug 12, 2014 at 5:33 AM, Modassar Ather <modather1...@gmail.com> wrote: > Hi Jack, > > Thanks for your suggestion. I think the way I am using the > ParseDateFieldUpdateProcessorFactory is not right hence the date is not > getting transformed to the desired format. > I added following in solrconfig.xml and see no effect in search result. The > date is still in "yyyy-MM-dd'T'HH:mm:ss" format. > > <processor class="solr.ParseDateFieldUpdateProcessorFactory"> > <arr name="format"> > <str>yyyy-MM-dd</str> > </arr> > </processor> > > I have following field defined in schema.xml. Kindly provide an example to > configure it under solrconfig.xml to get the date changed to desired > format. > > <fieldType name="tdate" class="solr.TrieDateField" precisionStep="0" > positionIncrementGap="0"/> > > Also please let me know if I am missing anything in the configuration. > > Thanks, > Modassar > > > On Tue, Aug 12, 2014 at 5:05 PM, Jack Krupansky <j...@basetechnology.com> > wrote: > > > Use the parse date update request processor: > > > > http://lucene.apache.org/solr/4_9_0/solr-core/org/apache/ > > solr/update/processor/ParseDateFieldUpdateProcessorFactory.html > > > > Additional examples are in my e-book: > > http://www.lulu.com/us/en/shop/jack-krupansky/solr-4x- > > deep-dive-early-access-release-7/ebook/product-21203548.html > > > > -- Jack Krupansky > > > > -----Original Message----- From: Modassar Ather > > Sent: Tuesday, August 12, 2014 7:24 AM > > To: solr-user@lucene.apache.org > > Subject: Modifying date format when using TrieDateField. > > > > > > Hi, > > > > I have a TrieDateField where I want to store a date in "yyyy-MM-dd" > format > > as my source contains the date in same format. > > As I understand TrieDateField stores date in "yyyy-MM-dd'T'HH:mm:ss" > format > > hence the date is getting formatted to the same. > > > > Kindly let me know: > > How can I change the date format during indexing when using > > TrieDateField? > > How I can stop the date modification due to time zone? E.g. My > > 1972-07-03 date is getting changed to 1972-07-03T18:30:00Z when using > > TrieDateField. > > > > Thanks, > > Modassar > > >