C# Class Lucene.Net.Analysis.Sinks.DateRecognizerSinkFilter

Attempts to parse the CharTermAttribute#buffer() as a Date using a java.text.DateFormat. If the value is a Date, it will add it to the sink.

Inheritance: TeeSinkTokenFilter.SinkFilter
Exibir arquivo Open project: apache/lucenenet Class Usage Examples

Protected Properties

Property Type Description
culture IFormatProvider
formats string[]
style DateTimeStyles
termAtt ICharTermAttribute

Public Methods

Method Description
Accept ( Lucene.Net.Util.AttributeSource source ) : bool
DateRecognizerSinkFilter ( ) : Lucene.Net.Analysis.Tokenattributes

Creates a new instance of DateRecognizerSinkFilter using the current culture and DateTimeStyles.None. Loosely matches standard DateTime formats using DateTime.TryParse(string, IFormatProvider, DateTimeStyles, out DateTime).

DateRecognizerSinkFilter ( IFormatProvider culture ) : Lucene.Net.Analysis.Tokenattributes

Creates a new instance of DateRecognizerSinkFilter using the supplied culture and DateTimeStyles.None. Loosely matches standard DateTime formats using DateTime.TryParse(string, IFormatProvider, DateTimeStyles, out DateTime).

DateRecognizerSinkFilter ( IFormatProvider culture, DateTimeStyles style ) : Lucene.Net.Analysis.Tokenattributes

Creates a new instance of DateRecognizerSinkFilter using the supplied culture and DateTimeStyles. Loosely matches standard DateTime formats using DateTime.TryParse(string, IFormatProvider, DateTimeStyles, out DateTime).

DateRecognizerSinkFilter ( string format ) : Lucene.Net.Analysis.Tokenattributes

Creates a new instance of DateRecognizerSinkFilter using the current culture and DateTimeStyles.None. Strictly matches the supplied DateTime formats using DateTime.TryParseExact(string, string, IFormatProvider, DateTimeStyles, out DateTime).

DateRecognizerSinkFilter ( string format, IFormatProvider culture ) : Lucene.Net.Analysis.Tokenattributes

Creates a new instance of DateRecognizerSinkFilter using the supplied format, culture and DateTimeStyles.None. Strictly matches the supplied DateTime formats using DateTime.TryParseExact(string, string, IFormatProvider, DateTimeStyles, out DateTime).

DateRecognizerSinkFilter ( string format, IFormatProvider culture, DateTimeStyles style ) : Lucene.Net.Analysis.Tokenattributes

Creates a new instance of DateRecognizerSinkFilter using the supplied format, culture and DateTimeStyles. Strictly matches the supplied DateTime formats using DateTime.TryParseExact(string, string, IFormatProvider, DateTimeStyles, out DateTime).

Method Details

Accept() public method

public Accept ( Lucene.Net.Util.AttributeSource source ) : bool
source Lucene.Net.Util.AttributeSource
return bool

DateRecognizerSinkFilter() public method

Creates a new instance of DateRecognizerSinkFilter using the current culture and DateTimeStyles.None. Loosely matches standard DateTime formats using DateTime.TryParse(string, IFormatProvider, DateTimeStyles, out DateTime).
public DateRecognizerSinkFilter ( ) : Lucene.Net.Analysis.Tokenattributes
return Lucene.Net.Analysis.Tokenattributes

DateRecognizerSinkFilter() public method

Creates a new instance of DateRecognizerSinkFilter using the supplied culture and DateTimeStyles.None. Loosely matches standard DateTime formats using DateTime.TryParse(string, IFormatProvider, DateTimeStyles, out DateTime).
public DateRecognizerSinkFilter ( IFormatProvider culture ) : Lucene.Net.Analysis.Tokenattributes
culture IFormatProvider An object that supplies culture-specific format information
return Lucene.Net.Analysis.Tokenattributes

DateRecognizerSinkFilter() public method

Creates a new instance of DateRecognizerSinkFilter using the supplied culture and DateTimeStyles. Loosely matches standard DateTime formats using DateTime.TryParse(string, IFormatProvider, DateTimeStyles, out DateTime).
public DateRecognizerSinkFilter ( IFormatProvider culture, DateTimeStyles style ) : Lucene.Net.Analysis.Tokenattributes
culture IFormatProvider An object that supplies culture-specific format information
style DateTimeStyles A bitwise combination of enumeration values that indicates the permitted format of s. /// A typical value to specify is
return Lucene.Net.Analysis.Tokenattributes

DateRecognizerSinkFilter() public method

Creates a new instance of DateRecognizerSinkFilter using the current culture and DateTimeStyles.None. Strictly matches the supplied DateTime formats using DateTime.TryParseExact(string, string, IFormatProvider, DateTimeStyles, out DateTime).
public DateRecognizerSinkFilter ( string format ) : Lucene.Net.Analysis.Tokenattributes
format string The allowable format of the . /// If supplied, it must match the format of the date exactly to get a match.
return Lucene.Net.Analysis.Tokenattributes

DateRecognizerSinkFilter() public method

Creates a new instance of DateRecognizerSinkFilter using the supplied format, culture and DateTimeStyles.None. Strictly matches the supplied DateTime formats using DateTime.TryParseExact(string, string, IFormatProvider, DateTimeStyles, out DateTime).
public DateRecognizerSinkFilter ( string format, IFormatProvider culture ) : Lucene.Net.Analysis.Tokenattributes
format string The allowable format of the . /// If supplied, it must match the format of the date exactly to get a match.
culture IFormatProvider An object that supplies culture-specific format information
return Lucene.Net.Analysis.Tokenattributes

DateRecognizerSinkFilter() public method

Creates a new instance of DateRecognizerSinkFilter using the supplied format, culture and DateTimeStyles. Strictly matches the supplied DateTime formats using DateTime.TryParseExact(string, string, IFormatProvider, DateTimeStyles, out DateTime).
public DateRecognizerSinkFilter ( string format, IFormatProvider culture, DateTimeStyles style ) : Lucene.Net.Analysis.Tokenattributes
format string The allowable format of the . /// If supplied, it must match the format of the date exactly to get a match.
culture IFormatProvider An object that supplies culture-specific format information
style DateTimeStyles A bitwise combination of enumeration values that indicates the permitted format of s. /// A typical value to specify is
return Lucene.Net.Analysis.Tokenattributes

Property Details

culture protected_oe property

protected IFormatProvider culture
return IFormatProvider

formats protected_oe property

protected string[] formats
return string[]

style protected_oe property

protected DateTimeStyles style
return DateTimeStyles

termAtt protected_oe property

protected ICharTermAttribute termAtt
return ICharTermAttribute