Class AbstractAnalysisFactory
Abstract parent class for analysis factories TokenizerFactory,
TokenFilterFactory and CharFilterFactory.
The typical lifecycle for a factory consumer is:
- Create factory via its constructor (or via XXXFactory.ForName)
- (Optional) If the factory uses resources such as files,
Inform(IResourceLoader) is called to initialize those resources.
- Consumer calls create() to obtain instances.
Inheritance
System.Object
AbstractAnalysisFactory
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public abstract class AbstractAnalysisFactory
Constructors
|
Improve this Doc
View Source
AbstractAnalysisFactory(IDictionary<String, String>)
Initialize this factory via a set of key-value pairs.
Declaration
protected AbstractAnalysisFactory(IDictionary<string, string> args)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
Fields
|
Improve this Doc
View Source
LUCENE_MATCH_VERSION_PARAM
Declaration
public const string LUCENE_MATCH_VERSION_PARAM = "luceneMatchVersion"
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
m_luceneMatchVersion
Declaration
protected readonly LuceneVersion m_luceneMatchVersion
Field Value
Properties
|
Improve this Doc
View Source
IsExplicitLuceneMatchVersion
Declaration
public virtual bool IsExplicitLuceneMatchVersion { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
LuceneMatchVersion
Declaration
public LuceneVersion LuceneMatchVersion { get; }
Property Value
|
Improve this Doc
View Source
OriginalArgs
Declaration
public IDictionary<string, string> OriginalArgs { get; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
|
Methods
|
Improve this Doc
View Source
AssureMatchVersion()
Declaration
protected void AssureMatchVersion()
|
Improve this Doc
View Source
Get(IDictionary<String, String>, String, ICollection<String>)
Declaration
public virtual string Get(IDictionary<string, string> args, string name, ICollection<string> allowedValues)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.Collections.Generic.ICollection<System.String> |
allowedValues |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Get(IDictionary<String, String>, String, ICollection<String>, String)
Declaration
public virtual string Get(IDictionary<string, string> args, string name, ICollection<string> allowedValues, string defaultVal)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.Collections.Generic.ICollection<System.String> |
allowedValues |
|
System.String |
defaultVal |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Get(IDictionary<String, String>, String, ICollection<String>, String, Boolean)
Declaration
public virtual string Get(IDictionary<string, string> args, string name, ICollection<string> allowedValues, string defaultVal, bool caseSensitive)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.Collections.Generic.ICollection<System.String> |
allowedValues |
|
System.String |
defaultVal |
|
System.Boolean |
caseSensitive |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Get(IDictionary<String, String>, String, String)
Declaration
public virtual string Get(IDictionary<string, string> args, string name, string defaultVal = null)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.String |
defaultVal |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GetBoolean(IDictionary<String, String>, String, Boolean)
Declaration
protected bool GetBoolean(IDictionary<string, string> args, string name, bool defaultVal)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.Boolean |
defaultVal |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetChar(IDictionary<String, String>, String, Char)
Declaration
public virtual char GetChar(IDictionary<string, string> args, string name, char defaultVal)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.Char |
defaultVal |
|
Returns
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
GetClassArg()
Declaration
public virtual string GetClassArg()
Returns
Type |
Description |
System.String |
the string used to specify the concrete class name in a serialized representation: the class arg. If the concrete class name was not specified via a class arg, returns GetType().Name .
|
|
Improve this Doc
View Source
GetCulture(IDictionary<String, String>, String, CultureInfo)
Gets a System.Globalization.CultureInfo value of the specified argument key name
.
To specify the invariant culture, pass the string "invariant"
.
LUCENENET specific
Declaration
protected CultureInfo GetCulture(IDictionary<string, string> args, string name, CultureInfo defaultVal)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.Globalization.CultureInfo |
defaultVal |
|
Returns
Type |
Description |
System.Globalization.CultureInfo |
|
|
Improve this Doc
View Source
GetInt32(IDictionary<String, String>, String, Int32)
NOTE: This was getInt() in Lucene
Declaration
protected int GetInt32(IDictionary<string, string> args, string name, int defaultVal)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.Int32 |
defaultVal |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
GetLines(IResourceLoader, String)
Returns the resource's lines (with content treated as UTF-8)
Declaration
protected IList<string> GetLines(IResourceLoader loader, string resource)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IList<System.String> |
|
|
Improve this Doc
View Source
GetPattern(IDictionary<String, String>, String)
Compiles a pattern for the value of the specified argument key name
Declaration
protected Regex GetPattern(IDictionary<string, string> args, string name)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
Returns
Type |
Description |
System.Text.RegularExpressions.Regex |
|
|
Improve this Doc
View Source
GetSet(IDictionary<String, String>, String)
Returns whitespace- and/or comma-separated set of values, or null if none are found
Declaration
public virtual ISet<string> GetSet(IDictionary<string, string> args, string name)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
Returns
Type |
Description |
System.Collections.Generic.ISet<System.String> |
|
|
Improve this Doc
View Source
GetSingle(IDictionary<String, String>, String, Single)
NOTE: This was getFloat() in Lucene
Declaration
protected float GetSingle(IDictionary<string, string> args, string name, float defaultVal)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.Single |
defaultVal |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
GetSnowballWordSet(IResourceLoader, String, Boolean)
Declaration
protected CharArraySet GetSnowballWordSet(IResourceLoader loader, string wordFiles, bool ignoreCase)
Parameters
Type |
Name |
Description |
IResourceLoader |
loader |
|
System.String |
wordFiles |
|
System.Boolean |
ignoreCase |
|
Returns
|
Improve this Doc
View Source
GetWordSet(IResourceLoader, String, Boolean)
Returns as CharArraySet from wordFiles, which
can be a comma-separated list of filenames
Declaration
protected CharArraySet GetWordSet(IResourceLoader loader, string wordFiles, bool ignoreCase)
Parameters
Type |
Name |
Description |
IResourceLoader |
loader |
|
System.String |
wordFiles |
|
System.Boolean |
ignoreCase |
|
Returns
|
Improve this Doc
View Source
Require(IDictionary<String, String>, String)
Declaration
public virtual string Require(IDictionary<string, string> args, string name)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Require(IDictionary<String, String>, String, ICollection<String>)
Declaration
public virtual string Require(IDictionary<string, string> args, string name, ICollection<string> allowedValues)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.Collections.Generic.ICollection<System.String> |
allowedValues |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Require(IDictionary<String, String>, String, ICollection<String>, Boolean)
Declaration
public virtual string Require(IDictionary<string, string> args, string name, ICollection<string> allowedValues, bool caseSensitive)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
System.Collections.Generic.ICollection<System.String> |
allowedValues |
|
System.Boolean |
caseSensitive |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
RequireBoolean(IDictionary<String, String>, String)
Declaration
protected bool RequireBoolean(IDictionary<string, string> args, string name)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
RequireChar(IDictionary<String, String>, String)
Declaration
public virtual char RequireChar(IDictionary<string, string> args, string name)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
Returns
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
RequireInt32(IDictionary<String, String>, String)
NOTE: This was requireInt() in Lucene
Declaration
protected int RequireInt32(IDictionary<string, string> args, string name)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
RequireSingle(IDictionary<String, String>, String)
NOTE: This was requireFloat() in Lucene
Declaration
protected float RequireSingle(IDictionary<string, string> args, string name)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
args |
|
System.String |
name |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
SplitFileNames(String)
Splits file names separated by comma character.
File names can contain comma characters escaped by backslash ''
Declaration
protected IList<string> SplitFileNames(string fileNames)
Parameters
Type |
Name |
Description |
System.String |
fileNames |
the string containing file names
|
Returns
Type |
Description |
System.Collections.Generic.IList<System.String> |
a list of file names with the escaping backslashed removed
|