On Wed, Aug 12, 2009 at 7:15 AM, Bernadette Houghton < bernadette.hough...@deakin.edu.au> wrote:
> Am very new to SOLR, so this question may seem overly basic - > > In schema.xml, I have a date field type - > > <fieldType name="date" class="solr.DateField" sortMissingLast="true" > omitNorms="true"/> > > used by - > > <dynamicField name="*_dt" type="date" indexed="true" stored="true"/> > <dynamicField name="*_mdt" type="date" indexed="true" stored="true" > multiValued="true" /> > > and want to create additional indexes based on variations of the date, e.g. > year, decade (which can then be used as facets). I'm assuming I need to set > up another field type and apply a suitable tokenizer?? Is this correct, and > if so, which tokenizer? > You can extract the year/decade prior to indexing and put into a separate field. There is no tokenizer in Solr/Lucene which will parse dates. However, I guess the PatternTokenizer can be used to do parse out the year etc. -- Regards, Shalin Shekhar Mangar.