Hello - i would opt for having a date field, and a custom update processor that converts a string date via DateUtils.parseDate() to an actual Date object. I think this would be a much simpler approach than a custom field or token filter.
Markus -----Original message----- > From:Miguel Valencia Zurera <miguel.valen...@juntadeandalucia.es> > Sent: Tuesday 2nd February 2016 13:09 > To: solr-user@lucene.apache.org > Subject: filters to work with dates > > Hi everybody > > I'm looking for a filter o similar function to resolve the next problem > in my solr index: > I have a string field that it contains a date but each record of this > field can be in diferent formats. Now I have to sort by this field and > for this I have to normalize this field. I've thought create a new kind > of field and to use a index filter to transform to date UTC, but I do > not find a similar filter to do it. > > https://cwiki.apache.org/confluence/display/solr/Filter+Descriptions > > I think that I have to developed a custom index filter to take string, > look for a possible date pattern, and transform to date. > What do you think about this? > Somebody can confirm me, that this way is the best way? or is there any > options? > > thanks >