org.apache.lucene.analysis.miscellaneous

Class DateRecognizerFilterFactory



  • public class DateRecognizerFilterFactory
    extends TokenFilterFactory
    Factory for DateRecognizerFilter.
     <fieldType name="text_filter_none_date" class="solr.TextField" positionIncrementGap="100">
       <analyzer>
         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
         <filter class="solr.DateRecognizerFilterFactory" datePattern="yyyy/mm/dd" locale="en-US" />
       </analyzer>
     </fieldType>
     

    The datePattern is optional. If omitted, DateRecognizerFilter will be created with the default date format of the system. The locale is optional and if omitted the filter will be created with Locale.ENGLISH.