public SynonymFilterFactory(IDictionary<string, string> args)
: base(args)
{
AssureMatchVersion();
#pragma warning disable 612, 618
if (luceneMatchVersion.OnOrAfter(Lucene.Net.Util.LuceneVersion.LUCENE_34))
{
delegator = new FSTSynonymFilterFactory(new Dictionary<string, string>(OriginalArgs));
}
#pragma warning restore 612, 618
else
{
// check if you use the new optional arg "format". this makes no sense for the old one,
// as its wired to solr's synonyms format only.
if (args.ContainsKey("format") && !args["format"].Equals("solr"))
{
throw new System.ArgumentException("You must specify luceneMatchVersion >= 3.4 to use alternate synonyms formats");
}
#pragma warning disable 612, 618
delegator = new SlowSynonymFilterFactory(new Dictionary<string, string>(OriginalArgs));
#pragma warning restore 612, 618
}
}