本文整理汇总了C#中Lucene.Net.Util.Version.OnOrAfter方法的典型用法代码示例。如果您正苦于以下问题:C# Lucene.Net.Util.Version.OnOrAfter方法的具体用法?C# Lucene.Net.Util.Version.OnOrAfter怎么用?C# Lucene.Net.Util.Version.OnOrAfter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lucene.Net.Util.Version
的用法示例。
在下文中一共展示了Lucene.Net.Util.Version.OnOrAfter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
private void Init(System.IO.TextReader input, Version matchVersion)
{
if (matchVersion.OnOrAfter(Version.LUCENE_24))
{
Init(input, true);
}
else
{
Init(input, false);
}
}
示例2: Init
private void Init(Version matchVersion)
{
SetOverridesTokenStreamMethod(typeof(StandardAnalyzer));
if (matchVersion.OnOrAfter(Version.LUCENE_29))
{
enableStopPositionIncrements = true;
}
else
{
useDefaultStopPositionIncrements = true;
}
if (matchVersion.OnOrAfter(Version.LUCENE_24))
{
replaceInvalidAcronym = defaultReplaceInvalidAcronym;
}
else
{
replaceInvalidAcronym = false;
}
}
示例3: QueryParser
/// <summary> Constructs a query parser.
///
/// </summary>
/// <param name="matchVersion">Lucene version to match. See <a href="#version">above</a>)
/// </param>
/// <param name="f">the default field for query terms.
/// </param>
/// <param name="a">used to find terms in the query text.
/// </param>
public QueryParser(Version matchVersion, System.String f, Analyzer a):this(new FastCharStream(new System.IO.StringReader("")))
{
analyzer = a;
field = f;
if (matchVersion.OnOrAfter(Version.LUCENE_29))
{
enablePositionIncrements = true;
}
else
{
enablePositionIncrements = false;
}
}
示例4: GetEnablePositionIncrementsVersionDefault
/// <summary> Returns version-dependent default for enablePositionIncrements. Analyzers
/// that embed StopFilter use this method when creating the StopFilter. Prior
/// to 2.9, this returns {@link #getEnablePositionIncrementsDefault}. On 2.9
/// or later, it returns true.
/// </summary>
public static bool GetEnablePositionIncrementsVersionDefault(Version matchVersion)
{
if (matchVersion.OnOrAfter(Version.LUCENE_29))
{
return true;
}
else
{
return ENABLE_POSITION_INCREMENTS_DEFAULT;
}
}