Sounds like a good addition to Solr. A document transformer would be the better choice. See: https://cwiki.apache.org/confluence/display/solr/Transforming+Result+Documents
The primary purpose of a function query is to affect relevance, although, yes, they can sort of be (mis)used as document transformers as well. Maybe you could generalize it to "format" and handle non-date fields as well. -- Jack Krupansky On Fri, Jun 12, 2015 at 11:20 AM, simon <simon.rosent...@yahoo.com> wrote: > Has anyone written a Solr function which will reformat Solr's ISO8601 Date > fields and could be used to generate pseudo-fields in search results ? > > I am converting existing appplications that have baked-in assumptions that > dates are in the format yyyy-mm-dd to use Solr, and tracking down every > place where a date format conversion is needed is proving painful indeed > ;=( > > My thought is to write a custom function of the form > datereformatter(<date_field_name>, <format_string>) but I thought I'd > check if it's already been done or if someone can suggest a better > approach. > > regards > > -Simon >