Exemple #1
0
        /// <summary>
        /// Initialize this factory via a set of key-value pairs.
        /// </summary>
        protected internal AbstractAnalysisFactory(IDictionary <string, string> args)
        {
            ExplicitLuceneMatchVersion = false;
            originalArgs = Collections.UnmodifiableMap(args);
            string version = get(args, LUCENE_MATCH_VERSION_PARAM);

            luceneMatchVersion = version == null ? (LuceneVersion?)null : LuceneVersionHelpers.ParseLeniently(version);
            args.Remove(CLASS_NAME); // consume the class arg
        }
Exemple #2
0
        /// <summary>
        /// Initialize this factory via a set of key-value pairs.
        /// </summary>
        protected internal AbstractAnalysisFactory(IDictionary <string, string> args)
        {
            ExplicitLuceneMatchVersion = false;
            originalArgs = Collections.UnmodifiableMap(args);
            string version = Get(args, LUCENE_MATCH_VERSION_PARAM);

            // LUCENENET TODO: What should we do if the version is null?
            //luceneMatchVersion = version == null ? (LuceneVersion?)null : LuceneVersionHelpers.ParseLeniently(version);
            luceneMatchVersion = version == null ?
#pragma warning disable 612, 618
                                 LuceneVersion.LUCENE_CURRENT :
#pragma warning restore 612, 618
                                 LuceneVersionHelpers.ParseLeniently(version);
            args.Remove(CLASS_NAME); // consume the class arg
        }