Example #1
0
        protected internal override Query GetFieldQuery(string field, string queryText, bool quoted)
        {
            Tuple <string, string> splitExtensionField = this.extensions
                                                         .SplitExtensionField(defaultField, field);
            ParserExtension extension = this.extensions
                                        .GetExtension(splitExtensionField.Item2);

            if (extension != null)
            {
                return(extension.Parse(new ExtensionQuery(this, splitExtensionField.Item1,
                                                          queryText)));
            }
            return(base.GetFieldQuery(field, queryText, quoted));
        }
Example #2
0
 /// <summary>
 /// Adds a new <see cref="ParserExtension"/> instance associated with the given key.
 /// </summary>
 /// <param name="key">the parser extension key</param>
 /// <param name="extension">the parser extension</param>
 public virtual void Add(string key, ParserExtension extension)
 {
     this.extensions[key] = extension;
 }