lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [04/58] lucenenet git commit: WIP on QueryParsers.Flexible
Date Tue, 06 Dec 2016 15:11:39 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.QueryParser/Flexible/Standard/StandardQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/StandardQueryParser.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/StandardQueryParser.cs
new file mode 100644
index 0000000..f0f89b1
--- /dev/null
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/StandardQueryParser.cs
@@ -0,0 +1,651 @@
+using Lucene.Net.Analysis;
+using Lucene.Net.Documents;
+using Lucene.Net.QueryParsers.Flexible.Core;
+using Lucene.Net.QueryParsers.Flexible.Core.Config;
+using Lucene.Net.QueryParsers.Flexible.Standard.Builders;
+using Lucene.Net.QueryParsers.Flexible.Standard.Config;
+using Lucene.Net.QueryParsers.Flexible.Standard.Parser;
+using Lucene.Net.QueryParsers.Flexible.Standard.Processors;
+using Lucene.Net.Search;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.QueryParsers.Flexible.Standard
+{
+    public class StandardQueryParser : QueryParserHelper, ICommonQueryParserConfiguration
+    {
+        
+        /**
+* Constructs a {@link StandardQueryParser} object.
+*/
+        public StandardQueryParser()
+            : base(new StandardQueryConfigHandler(), new StandardSyntaxParser(),
+                new StandardQueryNodeProcessorPipeline(null),
+                new StandardQueryTreeBuilder())
+        {
+            EnablePositionIncrements = true;
+        }
+
+        /**
+         * Constructs a {@link StandardQueryParser} object and sets an
+         * {@link Analyzer} to it. The same as:
+         * 
+         * <ul>
+         * StandardQueryParser qp = new StandardQueryParser();
+         * qp.getQueryConfigHandler().setAnalyzer(analyzer);
+         * </ul>
+         * 
+         * @param analyzer
+         *          the analyzer to be used by this query parser helper
+         */
+        public StandardQueryParser(Analyzer analyzer)
+            : this()
+        {
+            this.Analyzer = analyzer;
+        }
+
+
+        public override string ToString()
+        {
+            return "<StandardQueryParser config=\"" + this.GetQueryConfigHandler()
+                + "\"/>";
+        }
+
+        /**
+         * Overrides {@link QueryParserHelper#parse(String, String)} so it casts the
+         * return object to {@link Query}. For more reference about this method, check
+         * {@link QueryParserHelper#parse(String, String)}.
+         * 
+         * @param query
+         *          the query string
+         * @param defaultField
+         *          the default field used by the text parser
+         * 
+         * @return the object built from the query
+         * 
+         * @throws QueryNodeException
+         *           if something wrong happens along the three phases
+         */
+        public override /*Query*/ object Parse(string query, string defaultField) // LUCENENET TODO: Can this be return type Query?
+        {
+
+            return (Query)base.Parse(query, defaultField);
+
+        }
+
+        /**
+         * Gets implicit operator setting, which will be either {@link Operator#AND}
+         * or {@link Operator#OR}.
+         */
+        public Operator? GetDefaultOperator()
+        {
+            return GetQueryConfigHandler().Get(ConfigurationKeys.DEFAULT_OPERATOR);
+        }
+
+        /**
+         * Sets the boolean operator of the QueryParser. In default mode (
+         * {@link Operator#OR}) terms without any modifiers are considered optional:
+         * for example <code>capital of Hungary</code> is equal to
+         * <code>capital OR of OR Hungary</code>.<br/>
+         * In {@link Operator#AND} mode terms are considered to be in conjunction: the
+         * above mentioned query is parsed as <code>capital AND of AND Hungary</code>
+         */
+        public void SetDefaultOperator(Operator @operator)
+        {
+            GetQueryConfigHandler().Set(ConfigurationKeys.DEFAULT_OPERATOR, @operator);
+        }
+
+
+        public bool LowercaseExpandedTerms
+        {
+            get
+            {
+                bool? lowercaseExpandedTerms = GetQueryConfigHandler().Get(ConfigurationKeys.LOWERCASE_EXPANDED_TERMS);
+                return lowercaseExpandedTerms.HasValue ? lowercaseExpandedTerms.Value : true;
+            }
+            set
+            {
+                GetQueryConfigHandler().Set(ConfigurationKeys.LOWERCASE_EXPANDED_TERMS, value);
+            }
+        }
+
+        ///**
+        // * Set to <code>true</code> to allow leading wildcard characters.
+        // * <p>
+        // * When set, <code>*</code> or <code>?</code> are allowed as the first
+        // * character of a PrefixQuery and WildcardQuery. Note that this can produce
+        // * very slow queries on big indexes.
+        // * <p>
+        // * Default: false.
+        // */
+
+        //public override void SetLowercaseExpandedTerms(bool lowercaseExpandedTerms)
+        //{
+        //    GetQueryConfigHandler().Set(ConfigurationKeys.LOWERCASE_EXPANDED_TERMS, lowercaseExpandedTerms);
+        //}
+
+        ///**
+        // * @see #setLowercaseExpandedTerms(boolean)
+        // */
+
+        //public override bool GetLowercaseExpandedTerms()
+        //{
+        //    bool? lowercaseExpandedTerms = GetQueryConfigHandler().Get(ConfigurationKeys.LOWERCASE_EXPANDED_TERMS);
+
+        //    if (lowercaseExpandedTerms == null)
+        //    {
+        //        return true;
+
+        //    }
+        //    else
+        //    {
+        //        return lowercaseExpandedTerms.Value;
+        //    }
+
+        //}
+
+        public bool AllowLeadingWildcard
+        {
+            get
+            {
+                bool? allowLeadingWildcard = GetQueryConfigHandler().Get(ConfigurationKeys.ALLOW_LEADING_WILDCARD);
+                return allowLeadingWildcard.HasValue ? allowLeadingWildcard.Value : false;
+            }
+            set
+            {
+                GetQueryConfigHandler().Set(ConfigurationKeys.ALLOW_LEADING_WILDCARD, value);
+            }
+        }
+
+        ///**
+        // * Set to <code>true</code> to allow leading wildcard characters.
+        // * <p>
+        // * When set, <code>*</code> or <code>?</code> are allowed as the first
+        // * character of a PrefixQuery and WildcardQuery. Note that this can produce
+        // * very slow queries on big indexes.
+        // * <p>
+        // * Default: false.
+        // */
+
+        //public override void SetAllowLeadingWildcard(bool allowLeadingWildcard)
+        //{
+        //    GetQueryConfigHandler().Set(ConfigurationKeys.ALLOW_LEADING_WILDCARD, allowLeadingWildcard);
+        //}
+
+        public bool EnablePositionIncrements
+        {
+            get
+            {
+                bool? enablePositionsIncrements = GetQueryConfigHandler().Get(ConfigurationKeys.ENABLE_POSITION_INCREMENTS);
+                return enablePositionsIncrements.HasValue ? enablePositionsIncrements.Value : false;
+            }
+            set
+            {
+                GetQueryConfigHandler().Set(ConfigurationKeys.ENABLE_POSITION_INCREMENTS, value);
+            }
+        }
+
+        ///**
+        // * Set to <code>true</code> to enable position increments in result query.
+        // * <p>
+        // * When set, result phrase and multi-phrase queries will be aware of position
+        // * increments. Useful when e.g. a StopFilter increases the position increment
+        // * of the token that follows an omitted token.
+        // * <p>
+        // * Default: false.
+        // */
+
+        //public override void SetEnablePositionIncrements(bool enabled)
+        //{
+        //    GetQueryConfigHandler().Set(ConfigurationKeys.ENABLE_POSITION_INCREMENTS, enabled);
+        //}
+
+        ///**
+        // * @see #setEnablePositionIncrements(boolean)
+        // */
+
+        //public override bool GetEnablePositionIncrements()
+        //{
+        //    bool? enablePositionsIncrements = GetQueryConfigHandler().Get(ConfigurationKeys.ENABLE_POSITION_INCREMENTS);
+
+        //    if (enablePositionsIncrements == null)
+        //    {
+        //        return false;
+
+        //    }
+        //    else
+        //    {
+        //        return enablePositionsIncrements.Value;
+        //    }
+
+        //}
+
+        public MultiTermQuery.RewriteMethod MultiTermRewriteMethod
+        {
+            get
+            {
+                return GetQueryConfigHandler().Get(ConfigurationKeys.MULTI_TERM_REWRITE_METHOD);
+            }
+            set
+            {
+                GetQueryConfigHandler().Set(ConfigurationKeys.MULTI_TERM_REWRITE_METHOD, value);
+            }
+        }
+
+        ///**
+        // * By default, it uses
+        // * {@link MultiTermQuery#CONSTANT_SCORE_AUTO_REWRITE_DEFAULT} when creating a
+        // * prefix, wildcard and range queries. This implementation is generally
+        // * preferable because it a) Runs faster b) Does not have the scarcity of terms
+        // * unduly influence score c) avoids any {@link TooManyListenersException}
+        // * exception. However, if your application really needs to use the
+        // * old-fashioned boolean queries expansion rewriting and the above points are
+        // * not relevant then use this change the rewrite method.
+        // */
+
+        //public override void SetMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
+        //{
+        //    GetQueryConfigHandler().Set(ConfigurationKeys.MULTI_TERM_REWRITE_METHOD, method);
+        //}
+
+        ///**
+        // * @see #setMultiTermRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod)
+        // */
+
+        //public override MultiTermQuery.RewriteMethod GetMultiTermRewriteMethod()
+        //{
+        //    return GetQueryConfigHandler().Get(ConfigurationKeys.MULTI_TERM_REWRITE_METHOD);
+        //}
+
+        /**
+         * Set the fields a query should be expanded to when the field is
+         * <code>null</code>
+         * 
+         * @param fields the fields used to expand the query
+         */
+        public void SetMultiFields(string[] fields)
+        {
+
+            if (fields == null)
+            {
+                fields = new string[0];
+            }
+
+            GetQueryConfigHandler().Set(ConfigurationKeys.MULTI_FIELDS, fields);
+
+        }
+
+        /**
+         * Returns the fields used to expand the query when the field for a
+         * certain query is <code>null</code>
+         * 
+         * @param fields the fields used to expand the query
+         */
+        public void GetMultiFields(string[] fields)
+        {
+            GetQueryConfigHandler().Get(ConfigurationKeys.MULTI_FIELDS);
+        }
+
+        public int FuzzyPrefixLength
+        {
+            get
+            {
+                FuzzyConfig fuzzyConfig = GetQueryConfigHandler().Get(ConfigurationKeys.FUZZY_CONFIG);
+
+                if (fuzzyConfig == null)
+                {
+                    return FuzzyQuery.DefaultPrefixLength;
+                }
+                else
+                {
+                    return fuzzyConfig.GetPrefixLength();
+                }
+            }
+            set
+            {
+                QueryConfigHandler config = GetQueryConfigHandler();
+                FuzzyConfig fuzzyConfig = config.Get(ConfigurationKeys.FUZZY_CONFIG);
+
+                if (fuzzyConfig == null)
+                {
+                    fuzzyConfig = new FuzzyConfig();
+                    config.Set(ConfigurationKeys.FUZZY_CONFIG, fuzzyConfig);
+                }
+
+                fuzzyConfig.SetPrefixLength(value);
+            }
+        }
+
+        ///**
+        // * Set the prefix length for fuzzy queries. Default is 0.
+        // * 
+        // * @param fuzzyPrefixLength
+        // *          The fuzzyPrefixLength to set.
+        // */
+
+        //public void SetFuzzyPrefixLength(int fuzzyPrefixLength)
+        //{
+        //    QueryConfigHandler config = GetQueryConfigHandler();
+        //    FuzzyConfig fuzzyConfig = config.Get(ConfigurationKeys.FUZZY_CONFIG);
+
+        //    if (fuzzyConfig == null)
+        //    {
+        //        fuzzyConfig = new FuzzyConfig();
+        //        config.Set(ConfigurationKeys.FUZZY_CONFIG, fuzzyConfig);
+        //    }
+
+        //    fuzzyConfig.SetPrefixLength(fuzzyPrefixLength);
+
+        //}
+
+        public void SetNumericConfigMap(IDictionary<string, NumericConfig> numericConfigMap)
+        {
+            GetQueryConfigHandler().Set(ConfigurationKeys.NUMERIC_CONFIG_MAP, numericConfigMap);
+        }
+
+        public IDictionary<string, NumericConfig> GetNumericConfigMap()
+        {
+            return GetQueryConfigHandler().Get(ConfigurationKeys.NUMERIC_CONFIG_MAP);
+        }
+
+        public CultureInfo Locale
+        {
+            get
+            {
+                return GetQueryConfigHandler().Get(ConfigurationKeys.LOCALE);
+            }
+            set
+            {
+                GetQueryConfigHandler().Set(ConfigurationKeys.LOCALE, value);
+            }
+        }
+
+        ///**
+        // * Set locale used by date range parsing.
+        // */
+
+        //public override void SetLocale(CultureInfo locale)
+        //{
+        //    GetQueryConfigHandler().Set(ConfigurationKeys.LOCALE, locale);
+        //}
+
+        ///**
+        // * Returns current locale, allowing access by subclasses.
+        // */
+
+        //public override CultureInfo GetLocale()
+        //{
+        //    return GetQueryConfigHandler().Get(ConfigurationKeys.LOCALE);
+        //}
+
+        public TimeZoneInfo TimeZone
+        {
+            get
+            {
+                return GetQueryConfigHandler().Get(ConfigurationKeys.TIMEZONE);
+            }
+            set
+            {
+                GetQueryConfigHandler().Set(ConfigurationKeys.TIMEZONE, value);
+            }
+        }
+
+        //public override void SetTimeZone(TimeZoneInfo timeZone)
+        //{
+        //    GetQueryConfigHandler().Set(ConfigurationKeys.TIMEZONE, timeZone);
+        //}
+
+
+        //public override TimeZoneInfo GetTimeZone()
+        //{
+        //    return GetQueryConfigHandler().Get(ConfigurationKeys.TIMEZONE);
+        //}
+
+        /**
+         * Sets the default slop for phrases. If zero, then exact phrase matches are
+         * required. Default value is zero.
+         * 
+         * @deprecated renamed to {@link #setPhraseSlop(int)}
+         */
+        [Obsolete]
+        public void SetDefaultPhraseSlop(int defaultPhraseSlop)
+        {
+            GetQueryConfigHandler().Set(ConfigurationKeys.PHRASE_SLOP, defaultPhraseSlop);
+        }
+
+        ///**
+        // * Sets the default slop for phrases. If zero, then exact phrase matches are
+        // * required. Default value is zero.
+        // */
+        //[Obsolete]
+        //public void SetPhraseSlop(int defaultPhraseSlop)
+        //{
+        //    GetQueryConfigHandler().Set(ConfigurationKeys.PHRASE_SLOP, defaultPhraseSlop);
+        //}
+
+        public Analyzer Analyzer
+        {
+            get
+            {
+                return GetQueryConfigHandler().Get(ConfigurationKeys.ANALYZER);
+            }
+            set
+            {
+                GetQueryConfigHandler().Set(ConfigurationKeys.ANALYZER, value);
+            }
+        }
+
+        //public void SetAnalyzer(Analyzer analyzer)
+        //{
+        //    GetQueryConfigHandler().Set(ConfigurationKeys.ANALYZER, analyzer);
+        //}
+
+        //public override Analyzer GetAnalyzer()
+        //{
+        //    return GetQueryConfigHandler().Get(ConfigurationKeys.ANALYZER);
+        //}
+
+        ///**
+        // * @see #setAllowLeadingWildcard(boolean)
+        // */
+
+        //public override bool GetAllowLeadingWildcard()
+        //{
+        //    bool? allowLeadingWildcard = GetQueryConfigHandler().Get(ConfigurationKeys.ALLOW_LEADING_WILDCARD);
+
+        //    if (allowLeadingWildcard == null)
+        //    {
+        //        return false;
+
+        //    }
+        //    else
+        //    {
+        //        return allowLeadingWildcard.Value;
+        //    }
+        //}
+
+        /**
+         * Get the minimal similarity for fuzzy queries.
+         */
+
+        //public override float GetFuzzyMinSim()
+        //{
+        //    FuzzyConfig fuzzyConfig = GetQueryConfigHandler().Get(ConfigurationKeys.FUZZY_CONFIG);
+        //    return (fuzzyConfig != null) ? fuzzyConfig.GetMinSimilarity() : FuzzyQuery.DefaultMinSimilarity;
+        //}
+
+        ///**
+        // * Get the prefix length for fuzzy queries.
+        // * 
+        // * @return Returns the fuzzyPrefixLength.
+        // */
+
+        //public override int GetFuzzyPrefixLength()
+        //{
+        //    FuzzyConfig fuzzyConfig = GetQueryConfigHandler().Get(ConfigurationKeys.FUZZY_CONFIG);
+
+        //    if (fuzzyConfig == null)
+        //    {
+        //        return FuzzyQuery.DefaultPrefixLength;
+        //    }
+        //    else
+        //    {
+        //        return fuzzyConfig.GetPrefixLength();
+        //    }
+        //}
+
+        public int PhraseSlop
+        {
+            get
+            {
+                int? phraseSlop = GetQueryConfigHandler().Get(ConfigurationKeys.PHRASE_SLOP);
+                return phraseSlop.HasValue ? phraseSlop.Value : 0;
+            }
+
+            set // LUCENENET TODO: obsolete
+            {
+                GetQueryConfigHandler().Set(ConfigurationKeys.PHRASE_SLOP, value);
+            }
+        }
+
+        ///**
+        // * Gets the default slop for phrases.
+        // */
+
+        //public override int GetPhraseSlop()
+        //{
+        //    int? phraseSlop = GetQueryConfigHandler().Get(ConfigurationKeys.PHRASE_SLOP);
+
+        //    if (phraseSlop == null)
+        //    {
+        //        return 0;
+
+        //    }
+        //    else
+        //    {
+        //        return phraseSlop.Value;
+        //    }
+        //}
+
+        public float FuzzyMinSim
+        {
+            get
+            {
+                FuzzyConfig fuzzyConfig = GetQueryConfigHandler().Get(ConfigurationKeys.FUZZY_CONFIG);
+                return (fuzzyConfig != null) ? fuzzyConfig.GetMinSimilarity() : FuzzyQuery.DefaultMinSimilarity;
+            }
+            set
+            {
+                QueryConfigHandler config = GetQueryConfigHandler();
+                FuzzyConfig fuzzyConfig = config.Get(ConfigurationKeys.FUZZY_CONFIG);
+
+                if (fuzzyConfig == null)
+                {
+                    fuzzyConfig = new FuzzyConfig();
+                    config.Set(ConfigurationKeys.FUZZY_CONFIG, fuzzyConfig);
+                }
+
+                fuzzyConfig.SetMinSimilarity(value);
+            }
+        }
+
+        ///**
+        // * Set the minimum similarity for fuzzy queries. Default is defined on
+        // * {@link FuzzyQuery#defaultMinSimilarity}.
+        // */
+
+        //public override void SetFuzzyMinSim(float fuzzyMinSim)
+        //{
+        //    QueryConfigHandler config = GetQueryConfigHandler();
+        //    FuzzyConfig fuzzyConfig = config.Get(ConfigurationKeys.FUZZY_CONFIG);
+
+        //    if (fuzzyConfig == null)
+        //    {
+        //        fuzzyConfig = new FuzzyConfig();
+        //        config.Set(ConfigurationKeys.FUZZY_CONFIG, fuzzyConfig);
+        //    }
+
+        //    fuzzyConfig.SetMinSimilarity(fuzzyMinSim);
+        //}
+
+        /**
+         * Sets the boost used for each field.
+         * 
+         * @param boosts a collection that maps a field to its boost 
+         */
+        public void SetFieldsBoost(IDictionary<string, float?> boosts)
+        {
+            GetQueryConfigHandler().Set(ConfigurationKeys.FIELD_BOOST_MAP, boosts);
+        }
+
+        /**
+         * Returns the field to boost map used to set boost for each field.
+         * 
+         * @return the field to boost map 
+         */
+        public IDictionary<string, float?> GetFieldsBoost()
+        {
+            return GetQueryConfigHandler().Get(ConfigurationKeys.FIELD_BOOST_MAP);
+        }
+
+        /**
+         * Sets the default {@link Resolution} used for certain field when
+         * no {@link Resolution} is defined for this field.
+         * 
+         * @param dateResolution the default {@link Resolution}
+         */
+
+        public virtual void SetDateResolution(DateTools.Resolution dateResolution)
+        {
+            GetQueryConfigHandler().Set(ConfigurationKeys.DATE_RESOLUTION, dateResolution);
+        }
+
+        /**
+         * Returns the default {@link Resolution} used for certain field when
+         * no {@link Resolution} is defined for this field.
+         * 
+         * @return the default {@link Resolution}
+         */
+        public DateTools.Resolution? GetDateResolution()
+        {
+            return GetQueryConfigHandler().Get(ConfigurationKeys.DATE_RESOLUTION);
+        }
+
+        /**
+         * Sets the {@link Resolution} used for each field
+         * 
+         * @param dateRes a collection that maps a field to its {@link Resolution}
+         * 
+         * @deprecated this method was renamed to {@link #setDateResolutionMap(Map)} 
+         */
+        [Obsolete]
+        public void SetDateResolution(IDictionary<string, DateTools.Resolution?> dateRes)
+        {
+            SetDateResolutionMap(dateRes);
+        }
+
+        /**
+         * Returns the field to {@link Resolution} map used to normalize each date field.
+         * 
+         * @return the field to {@link Resolution} map
+         */
+        public IDictionary<string, DateTools.Resolution?> GetDateResolutionMap()
+        {
+            return GetQueryConfigHandler().Get(ConfigurationKeys.FIELD_DATE_RESOLUTION_MAP);
+        }
+
+        /**
+         * Sets the {@link Resolution} used for each field
+         * 
+         * @param dateRes a collection that maps a field to its {@link Resolution}
+         */
+        public void SetDateResolutionMap(IDictionary<string, DateTools.Resolution?> dateRes)
+        {
+            GetQueryConfigHandler().Set(ConfigurationKeys.FIELD_DATE_RESOLUTION_MAP, dateRes);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj b/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
index 8a339ab..db43c85 100644
--- a/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
+++ b/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
@@ -55,8 +55,138 @@
     <Compile Include="Ext\ExtensionQuery.cs" />
     <Compile Include="Ext\Extensions.cs" />
     <Compile Include="Ext\ParserExtension.cs" />
+    <Compile Include="Flexible\Core\Builders\QueryBuilder.cs" />
+    <Compile Include="Flexible\Core\Builders\QueryTreeBuilder.cs" />
+    <Compile Include="Flexible\Core\Config\AbstractQueryConfig.cs" />
+    <Compile Include="Flexible\Core\Config\ConfigurationKey.cs" />
+    <Compile Include="Flexible\Core\Config\FieldConfig.cs" />
+    <Compile Include="Flexible\Core\Config\FieldConfigListener.cs" />
+    <Compile Include="Flexible\Core\Config\QueryConfigHandler.cs" />
+    <Compile Include="Flexible\Core\Messages\QueryParserMessages.cs" />
+    <Compile Include="Flexible\Core\Nodes\NoTokenFoundQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\AndQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\AnyQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\BooleanQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\BoostQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\DeletedQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\FieldableNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\FieldQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\FieldValuePairQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\FuzzyQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\GroupQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\MatchAllDocsQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\MatchNoDocsQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\ModifierQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\OpaqueQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\OrQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\PathQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\PhraseSlopQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\ProximityQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\QueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\QueryNodeImpl.cs" />
+    <Compile Include="Flexible\Core\Nodes\QuotedFieldQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\RangeQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\SlopQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\TextableQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\TokenizedPhraseQueryNode.cs" />
+    <Compile Include="Flexible\Core\Nodes\ValueQueryNode.cs" />
+    <Compile Include="Flexible\Core\Parser\EscapeQuerySyntax.cs" />
+    <Compile Include="Flexible\Core\Parser\SyntaxParser.cs" />
+    <Compile Include="Flexible\Core\Processors\NoChildOptimizationQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Core\Processors\QueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Core\Processors\QueryNodeProcessorImpl.cs" />
+    <Compile Include="Flexible\Core\Processors\QueryNodeProcessorPipeline.cs" />
+    <Compile Include="Flexible\Core\Processors\RemoveDeletedQueryNodesProcessor.cs" />
+    <Compile Include="Flexible\Core\QueryNodeError.cs" />
+    <Compile Include="Flexible\Core\QueryNodeException.cs" />
+    <Compile Include="Flexible\Core\QueryNodeParseException.cs" />
+    <Compile Include="Flexible\Core\QueryParserHelper.cs" />
+    <Compile Include="Flexible\Core\Util\QueryNodeOperation.cs" />
+    <Compile Include="Flexible\Core\Util\StringUtils.cs" />
+    <Compile Include="Flexible\Core\Util\UnescapedCharSequence.cs" />
+    <Compile Include="Flexible\Messages\Message.cs" />
+    <Compile Include="Flexible\Messages\MessageImpl.cs" />
+    <Compile Include="Flexible\Messages\NLS.cs" />
+    <Compile Include="Flexible\Messages\NLSException.cs" />
+    <Compile Include="Flexible\Precedence\PrecedenceQueryParser.cs" />
+    <Compile Include="Flexible\Precedence\Processors\BooleanModifiersQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Precedence\Processors\PrecedenceQueryNodeProcessorPipeline.cs" />
+    <Compile Include="Flexible\Standard\Builders\AnyQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\BooleanQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\BoostQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\DummyQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\FieldQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\FuzzyQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\GroupQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\MatchAllDocsQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\MatchNoDocsQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\ModifierQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\MultiPhraseQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\NumericRangeQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\PhraseQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\PrefixWildcardQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\RegexpQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\SlopQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\StandardBooleanQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\StandardQueryBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\StandardQueryTreeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\TermRangeQueryNodeBuilder.cs" />
+    <Compile Include="Flexible\Standard\Builders\WildcardQueryNodeBuilder.cs" />
     <Compile Include="Flexible\Standard\CommonQueryParserConfiguration.cs" />
+    <Compile Include="Flexible\Standard\Config\FieldBoostMapFCListener.cs" />
+    <Compile Include="Flexible\Standard\Config\FieldDateResolutionFCListener.cs" />
+    <Compile Include="Flexible\Standard\Config\FuzzyConfig.cs" />
+    <Compile Include="Flexible\Standard\Config\NumberDateFormat.cs" />
+    <Compile Include="Flexible\Standard\Config\NumericConfig.cs" />
+    <Compile Include="Flexible\Standard\Config\NumericFieldConfigListener.cs" />
+    <Compile Include="Flexible\Standard\Config\StandardQueryConfigHandler.cs" />
+    <Compile Include="Flexible\Standard\Nodes\AbstractRangeQueryNode.cs" />
+    <Compile Include="Flexible\Standard\Nodes\BooleanModifierNode.cs" />
+    <Compile Include="Flexible\Standard\Nodes\MultiPhraseQueryNode.cs" />
+    <Compile Include="Flexible\Standard\Nodes\NumericQueryNode.cs" />
+    <Compile Include="Flexible\Standard\Nodes\NumericRangeQueryNode.cs" />
+    <Compile Include="Flexible\Standard\Nodes\PrefixWildcardQueryNode.cs" />
+    <Compile Include="Flexible\Standard\Nodes\RegexpQueryNode.cs" />
+    <Compile Include="Flexible\Standard\Nodes\StandardBooleanQueryNode.cs" />
+    <Compile Include="Flexible\Standard\Nodes\TermRangeQueryNode.cs" />
+    <Compile Include="Flexible\Standard\Nodes\WildcardQueryNode.cs" />
+    <Compile Include="Flexible\Standard\Parser\CharStream.cs" />
+    <Compile Include="Flexible\Standard\Parser\EscapeQuerySyntaxImpl.cs" />
+    <Compile Include="Flexible\Standard\Parser\FastCharStream.cs" />
+    <Compile Include="Flexible\Standard\Parser\ParseException.cs" />
+    <Compile Include="Flexible\Standard\Parser\StandardSyntaxParser.cs" />
+    <Compile Include="Flexible\Standard\Parser\StandardSyntaxParserConstants.cs" />
+    <Compile Include="Flexible\Standard\Parser\StandardSyntaxParserTokenManager.cs" />
+    <Compile Include="Flexible\Standard\Parser\Token.cs" />
+    <Compile Include="Flexible\Standard\Parser\TokenMgrError.cs" />
+    <Compile Include="Flexible\Standard\Processors\AllowLeadingWildcardProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\AnalyzerQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\BooleanQuery2ModifierNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\BooleanSingleChildOptimizationQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\BoostQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\DefaultPhraseSlopQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\FuzzyQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\GroupQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\LowercaseExpandedTermsQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\MatchAllDocsQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\MultiFieldQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\MultiTermRewriteMethodProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\NumericQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\NumericRangeQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\OpenRangeQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\PhraseSlopQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\RemoveEmptyNonLeafQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\StandardQueryNodeProcessorPipeline.cs" />
+    <Compile Include="Flexible\Standard\Processors\TermRangeQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\Processors\WildcardQueryNodeProcessor.cs" />
+    <Compile Include="Flexible\Standard\QueryParserUtil.cs" />
+    <Compile Include="Flexible\Standard\StandardQueryParser.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
     <Compile Include="Simple\SimpleQueryParser.cs" />
     <Compile Include="Surround\Parser\CharStream.cs" />
     <Compile Include="Surround\Parser\FastCharStream.cs" />
@@ -96,6 +226,12 @@
       <Name>Lucene.Net</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.QueryParser/Properties/Resources.Designer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Properties/Resources.Designer.cs b/src/Lucene.Net.QueryParser/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..b3a8fe9
--- /dev/null
+++ b/src/Lucene.Net.QueryParser/Properties/Resources.Designer.cs
@@ -0,0 +1,225 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Lucene.Net.QueryParsers.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lucene.Net.QueryParsers.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Could not parse text &quot;{0}&quot; using {1}.
+        /// </summary>
+        internal static string COULD_NOT_PARSE_NUMBER {
+            get {
+                return ResourceManager.GetString("COULD_NOT_PARSE_NUMBER", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to .
+        /// </summary>
+        internal static string EMPTY_MESSAGE {
+            get {
+                return ResourceManager.GetString("EMPTY_MESSAGE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Syntax Error: {0}.
+        /// </summary>
+        internal static string INVALID_SYNTAX {
+            get {
+                return ResourceManager.GetString("INVALID_SYNTAX", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Syntax Error, cannot parse {0}: {1}.
+        /// </summary>
+        internal static string INVALID_SYNTAX_CANNOT_PARSE {
+            get {
+                return ResourceManager.GetString("INVALID_SYNTAX_CANNOT_PARSE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Term can not end with escape character..
+        /// </summary>
+        internal static string INVALID_SYNTAX_ESCAPE_CHARACTER {
+            get {
+                return ResourceManager.GetString("INVALID_SYNTAX_ESCAPE_CHARACTER", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Non-hex character in Unicode escape sequence: {0}.
+        /// </summary>
+        internal static string INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE {
+            get {
+                return ResourceManager.GetString("INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Truncated unicode escape sequence..
+        /// </summary>
+        internal static string INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION {
+            get {
+                return ResourceManager.GetString("INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Fractional edit distances are not allowed..
+        /// </summary>
+        internal static string INVALID_SYNTAX_FUZZY_EDITS {
+            get {
+                return ResourceManager.GetString("INVALID_SYNTAX_FUZZY_EDITS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The similarity value for a fuzzy search must be between 0.0 and 1.0..
+        /// </summary>
+        internal static string INVALID_SYNTAX_FUZZY_LIMITS {
+            get {
+                return ResourceManager.GetString("INVALID_SYNTAX_FUZZY_LIMITS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Leading wildcard is not allowed: {0}.
+        /// </summary>
+        internal static string LEADING_WILDCARD_NOT_ALLOWED {
+            get {
+                return ResourceManager.GetString("LEADING_WILDCARD_NOT_ALLOWED", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Cannot convert query to lucene syntax: {0} error: {1}.
+        /// </summary>
+        internal static string LUCENE_QUERY_CONVERSION_ERROR {
+            get {
+                return ResourceManager.GetString("LUCENE_QUERY_CONVERSION_ERROR", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to This node does not support this action..
+        /// </summary>
+        internal static string NODE_ACTION_NOT_SUPPORTED {
+            get {
+                return ResourceManager.GetString("NODE_ACTION_NOT_SUPPORTED", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Number class not supported by NumericRangeQueryNode: {0}.
+        /// </summary>
+        internal static string NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY {
+            get {
+                return ResourceManager.GetString("NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Field &quot;{0}&quot; is numeric and cannot have an empty value..
+        /// </summary>
+        internal static string NUMERIC_CANNOT_BE_EMPTY {
+            get {
+                return ResourceManager.GetString("NUMERIC_CANNOT_BE_EMPTY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Parameter {1} with value {0} not supported..
+        /// </summary>
+        internal static string PARAMETER_VALUE_NOT_SUPPORTED {
+            get {
+                return ResourceManager.GetString("PARAMETER_VALUE_NOT_SUPPORTED", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Too many boolean clauses, the maximum supported is {0}: {1}.
+        /// </summary>
+        internal static string TOO_MANY_BOOLEAN_CLAUSES {
+            get {
+                return ResourceManager.GetString("TOO_MANY_BOOLEAN_CLAUSES", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Unsupported NumericField.DataType: {0}.
+        /// </summary>
+        internal static string UNSUPPORTED_NUMERIC_DATA_TYPE {
+            get {
+                return ResourceManager.GetString("UNSUPPORTED_NUMERIC_DATA_TYPE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Wildcard is not supported for query: {0}.
+        /// </summary>
+        internal static string WILDCARD_NOT_SUPPORTED {
+            get {
+                return ResourceManager.GetString("WILDCARD_NOT_SUPPORTED", resourceCulture);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.QueryParser/Properties/Resources.resx
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Properties/Resources.resx b/src/Lucene.Net.QueryParser/Properties/Resources.resx
new file mode 100644
index 0000000..c6680ce
--- /dev/null
+++ b/src/Lucene.Net.QueryParser/Properties/Resources.resx
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="COULD_NOT_PARSE_NUMBER" xml:space="preserve">
+    <value>Could not parse text "{0}" using {1}</value>
+  </data>
+  <data name="EMPTY_MESSAGE" xml:space="preserve">
+    <value />
+  </data>
+  <data name="INVALID_SYNTAX" xml:space="preserve">
+    <value>Syntax Error: {0}</value>
+    <comment>&lt;REPLACEMENT arg="{0}" value="detailed_message"/&gt;</comment>
+  </data>
+  <data name="INVALID_SYNTAX_CANNOT_PARSE" xml:space="preserve">
+    <value>Syntax Error, cannot parse {0}: {1}</value>
+    <comment>&lt;REPLACEMENT arg="{0}" value="invalid_query"/&gt;&lt;REPLACEMENT arg="{1}" value="detailed_message"/&gt;</comment>
+  </data>
+  <data name="INVALID_SYNTAX_ESCAPE_CHARACTER" xml:space="preserve">
+    <value>Term can not end with escape character.</value>
+  </data>
+  <data name="INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE" xml:space="preserve">
+    <value>Non-hex character in Unicode escape sequence: {0}</value>
+  </data>
+  <data name="INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION" xml:space="preserve">
+    <value>Truncated unicode escape sequence.</value>
+  </data>
+  <data name="INVALID_SYNTAX_FUZZY_EDITS" xml:space="preserve">
+    <value>Fractional edit distances are not allowed.</value>
+  </data>
+  <data name="INVALID_SYNTAX_FUZZY_LIMITS" xml:space="preserve">
+    <value>The similarity value for a fuzzy search must be between 0.0 and 1.0.</value>
+  </data>
+  <data name="LEADING_WILDCARD_NOT_ALLOWED" xml:space="preserve">
+    <value>Leading wildcard is not allowed: {0}</value>
+  </data>
+  <data name="LUCENE_QUERY_CONVERSION_ERROR" xml:space="preserve">
+    <value>Cannot convert query to lucene syntax: {0} error: {1}</value>
+    <comment>&lt;REPLACEMENT arg="{0}" value="query"/&gt;&lt;REPLACEMENT arg="{1}" value="error/class"/&gt;</comment>
+  </data>
+  <data name="NODE_ACTION_NOT_SUPPORTED" xml:space="preserve">
+    <value>This node does not support this action.</value>
+  </data>
+  <data name="NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY" xml:space="preserve">
+    <value>Number class not supported by NumericRangeQueryNode: {0}</value>
+  </data>
+  <data name="NUMERIC_CANNOT_BE_EMPTY" xml:space="preserve">
+    <value>Field "{0}" is numeric and cannot have an empty value.</value>
+  </data>
+  <data name="PARAMETER_VALUE_NOT_SUPPORTED" xml:space="preserve">
+    <value>Parameter {1} with value {0} not supported.</value>
+  </data>
+  <data name="TOO_MANY_BOOLEAN_CLAUSES" xml:space="preserve">
+    <value>Too many boolean clauses, the maximum supported is {0}: {1}</value>
+  </data>
+  <data name="UNSUPPORTED_NUMERIC_DATA_TYPE" xml:space="preserve">
+    <value>Unsupported NumericField.DataType: {0}</value>
+  </data>
+  <data name="WILDCARD_NOT_SUPPORTED" xml:space="preserve">
+    <value>Wildcard is not supported for query: {0}</value>
+  </data>
+</root>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Builders/TestQueryTreeBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Builders/TestQueryTreeBuilder.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Builders/TestQueryTreeBuilder.cs
new file mode 100644
index 0000000..207502c
--- /dev/null
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Builders/TestQueryTreeBuilder.cs
@@ -0,0 +1,60 @@
+using Lucene.Net.QueryParsers.Flexible.Core.Nodes;
+using Lucene.Net.QueryParsers.Flexible.Core.Parser;
+using Lucene.Net.QueryParsers.Flexible.Core.Util;
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.QueryParsers.Flexible.Core.Builders
+{
+    public class TestQueryTreeBuilder : LuceneTestCase
+    {
+        [Test]
+        public virtual void TestSetFieldBuilder()
+        {
+            QueryTreeBuilder qtb = new QueryTreeBuilder();
+            qtb.SetBuilder("field", new DummyBuilder());
+            Object result = qtb.Build(new FieldQueryNode(new UnescapedCharSequence("field").ToString(), "foo", 0, 0));
+            assertEquals("OK", result);
+
+            qtb = new QueryTreeBuilder();
+            qtb.SetBuilder(typeof(DummyQueryNodeInterface), new DummyBuilder());
+            result = qtb.Build(new DummyQueryNode());
+            assertEquals("OK", result);
+        }
+
+        private interface DummyQueryNodeInterface : IQueryNode
+        {
+
+        }
+
+        private abstract class AbstractDummyQueryNode : QueryNodeImpl, DummyQueryNodeInterface
+        {
+
+        }
+
+        private class DummyQueryNode : AbstractDummyQueryNode
+        {
+
+            
+        public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
+            {
+                return "DummyQueryNode";
+            }
+
+        }
+
+        private class DummyBuilder : IQueryBuilder
+        {
+            public virtual object Build(IQueryNode queryNode)
+            {
+                return "OK";
+            }
+
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Nodes/TestQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Nodes/TestQueryNode.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Nodes/TestQueryNode.cs
new file mode 100644
index 0000000..a09f296
--- /dev/null
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Nodes/TestQueryNode.cs
@@ -0,0 +1,60 @@
+using Lucene.Net.Support;
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
+{
+    public class TestQueryNode : LuceneTestCase
+    {
+        /* LUCENE-2227 bug in QueryNodeImpl.add() */
+        [Test]
+        public void testAddChildren()
+        {
+            IQueryNode nodeA = new FieldQueryNode("foo", "A", 0, 1);
+            IQueryNode nodeB = new FieldQueryNode("foo", "B", 1, 2);
+            BooleanQueryNode bq = new BooleanQueryNode(
+                Arrays.AsList(nodeA));
+            bq.Add(Arrays.AsList(nodeB));
+            assertEquals(2, bq.GetChildren().size());
+        }
+
+        /* LUCENE-3045 bug in QueryNodeImpl.containsTag(String key)*/
+        [Test]
+        public void testTags()
+        {
+            IQueryNode node = new FieldQueryNode("foo", "A", 0, 1);
+
+            node.SetTag("TaG", new Object());
+            assertTrue(node.GetTagMap().size() > 0);
+            assertTrue(node.ContainsTag("tAg"));
+            assertTrue(node.GetTag("tAg") != null);
+
+        }
+
+        /* LUCENE-5099 - QueryNodeProcessorImpl should set parent to null before returning on processing */
+        [Test]
+        public void testRemoveFromParent()
+        {
+            BooleanQueryNode booleanNode = new BooleanQueryNode(Collections.EmptyList<IQueryNode>());
+            FieldQueryNode fieldNode = new FieldQueryNode("foo", "A", 0, 1);
+            assertNull(fieldNode.GetParent());
+
+            booleanNode.Add(fieldNode);
+            assertNotNull(fieldNode.GetParent());
+
+            fieldNode.RemoveFromParent();
+            assertNull(fieldNode.GetParent());
+
+            booleanNode.Add(fieldNode);
+            assertNotNull(fieldNode.GetParent());
+
+            booleanNode.Set(Collections.EmptyList<IQueryNode>());
+            assertNull(fieldNode.GetParent());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.Designer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.Designer.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.Designer.cs
new file mode 100644
index 0000000..0ce0aa7
--- /dev/null
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Lucene.Net.QueryParsers.Flexible.Messages {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class MessagesTestBundle {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal MessagesTestBundle() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lucene.Net.QueryParsers.Flexible.Messages.MessagesTestBundle", typeof(MessagesTestBundle).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.cs
new file mode 100644
index 0000000..a495f3d
--- /dev/null
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.QueryParsers.Flexible.Messages
+{
+    //public class MessagesTestBundle
+    //{
+    //}
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.ja-JP.resx
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.ja-JP.resx b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.ja-JP.resx
new file mode 100644
index 0000000..9378bcb
--- /dev/null
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.ja-JP.resx
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="Q0001E_INVALID_SYNTAX" xml:space="preserve">
+    <value>\u69cb\u6587\u30a8\u30e9\u30fc: {0}</value>
+  </data>
+  <data name="Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION" xml:space="preserve">
+    <value>\u5207\u308a\u6368\u3066\u3089\u308c\u305f\u30e6\u30cb\u30b3\u30fc\u30c9\u30fb\u30a8\u30b9\u30b1\u30fc\u30d7\u30fb\u30b7\u30fc\u30b1\u30f3\u30b9\u3002</value>
+  </data>
+</root>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.resx
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.resx b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.resx
new file mode 100644
index 0000000..7d4fa31
--- /dev/null
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/MessagesTestBundle.resx
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="Q0001E_INVALID_SYNTAX" xml:space="preserve">
+    <value>Syntax Error: {0}</value>
+  </data>
+  <data name="Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION" xml:space="preserve">
+    <value>Truncated unicode escape sequence.</value>
+  </data>
+</root>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c83be6be/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/TestNLS.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/TestNLS.cs b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/TestNLS.cs
new file mode 100644
index 0000000..e99c73e
--- /dev/null
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Messages/TestNLS.cs
@@ -0,0 +1,121 @@
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.QueryParsers.Flexible.Messages
+{
+    public class TestNLS : LuceneTestCase
+    {
+        [Test]
+        public void testMessageLoading()
+        {
+            string message = MessagesTestBundle.ResourceManager.GetString("Q0001E_INVALID_SYNTAX");
+
+            fail("not implemented");
+
+            //IMessage invalidSyntax = new MessageImpl(
+            //    MessagesTestBundle.Q0001E_INVALID_SYNTAX, "XXX");
+            ///* 
+            // * if the default locale is ja, you get ja as a fallback:
+            // * see ResourceBundle.html#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
+            // */
+            ////if (!Locale.getDefault().getLanguage().equals("ja"))
+            ////    assertEquals("Syntax Error: XXX", invalidSyntax.getLocalizedMessage(Locale.ENGLISH));
+            //if (!CultureInfo.CurrentUICulture.Equals(new CultureInfo("ja-JP")))
+            //    assertEquals("Syntax Error: XXX", invalidSyntax.GetLocalizedMessage(new CultureInfo("en")));
+        }
+
+        //[Test]
+        //public void testMessageLoading_ja()
+        //{
+        //    IMessage invalidSyntax = new MessageImpl(
+        //        MessagesTestBundle.Q0001E_INVALID_SYNTAX, "XXX");
+        //    assertEquals("構文エラー: XXX", invalidSyntax
+        //        .GetLocalizedMessage(new CultureInfo("ja-JP")));
+        //}
+
+        //[Test]
+        //public void testNLSLoading()
+        //{
+        //    String message = NLS
+        //        .GetLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION, new CultureInfo("en"));
+        //    /* 
+        //     * if the default locale is ja, you get ja as a fallback:
+        //     * see ResourceBundle.html#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
+        //     */
+        //    //if (!Locale.getDefault().getLanguage().equals("ja"))
+        //    if (!CultureInfo.CurrentUICulture.TwoLetterISOLanguageName.Equals("ja", StringComparison.OrdinalIgnoreCase))
+        //        assertEquals("Truncated unicode escape sequence.", message);
+
+        //    message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0001E_INVALID_SYNTAX, new CultureInfo("en"),
+        //        "XXX");
+        //    /* 
+        //     * if the default locale is ja, you get ja as a fallback:
+        //     * see ResourceBundle.html#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
+        //     */
+        //    //if (!Locale.getDefault().getLanguage().equals("ja"))
+        //    //if (!CultureInfo.CurrentUICulture.Equals(new CultureInfo("ja-JP")))
+        //    if (!CultureInfo.CurrentUICulture.TwoLetterISOLanguageName.Equals("ja", StringComparison.OrdinalIgnoreCase))
+        //        assertEquals("Syntax Error: XXX", message);
+        //}
+
+        //[Test]
+        //public void testNLSLoading_ja()
+        //{
+        //    String message = NLS.GetLocalizedMessage(
+        //        MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION,
+        //        new CultureInfo("ja-JP"));
+        //    assertEquals("切り捨てられたユニコード・エスケープ・シーケンス。", message);
+
+        //    message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0001E_INVALID_SYNTAX,
+        //        new CultureInfo("ja-JP"), "XXX");
+        //    assertEquals("構文エラー: XXX", message);
+        //}
+
+        //[Test]
+        //public void testNLSLoading_xx_XX()
+        //{
+        //    //Locale locale = new Locale("xx", "XX", "");
+        //    CultureInfo locale = new CultureInfo("xx-XX");
+        //    String message = NLS.GetLocalizedMessage(
+        //        MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION,
+        //        locale);
+        //    /* 
+        //     * if the default locale is ja, you get ja as a fallback:
+        //     * see ResourceBundle.html#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
+        //     */
+        //    //if (!Locale.getDefault().getLanguage().equals("ja"))
+        //    if (!CultureInfo.CurrentUICulture.TwoLetterISOLanguageName.Equals("ja", StringComparison.OrdinalIgnoreCase))
+        //        assertEquals("Truncated unicode escape sequence.", message);
+
+        //    message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0001E_INVALID_SYNTAX,
+        //        locale, "XXX");
+        //    /* 
+        //     * if the default locale is ja, you get ja as a fallback:
+        //     * see ResourceBundle.html#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
+        //     */
+        //    //if (!Locale.getDefault().getLanguage().equals("ja"))
+        //    if (!CultureInfo.CurrentUICulture.TwoLetterISOLanguageName.Equals("ja", StringComparison.OrdinalIgnoreCase))
+        //        assertEquals("Syntax Error: XXX", message);
+        //}
+
+        // LUCENENET TODO: This doesn't compile because the resources don't contain this message
+
+        //[Test]
+        //public void testMissingMessage()
+        //{
+        //    //Locale locale = Locale.ENGLISH;
+        //    CultureInfo locale = new CultureInfo("en");
+        //    String message = NLS.GetLocalizedMessage(
+        //        MessagesTestBundle.Q0005E_MESSAGE_NOT_IN_BUNDLE, locale);
+
+        //    assertEquals("Message with key:Q0005E_MESSAGE_NOT_IN_BUNDLE and locale: "
+        //        + locale.toString() + " not found.", message);
+        //}
+    }
+}


Mime
View raw message