This class can be used to hold any query configuration and no field configuration. For field configuration, it creates an empty FieldConfig object and delegate it to field config listeners, these are responsible for setting up all the field configuration.

QueryConfigHandler should be extended by classes that intends to provide configuration to Processors.IQueryNodeProcessor objects.

The class that extends QueryConfigHandler should also provide FieldConfig objects for each collection field.

Наследование: AbstractQueryConfig
 public StandardQueryNodeProcessorPipeline(QueryConfigHandler queryConfig)
     : base(queryConfig)
 {
     Add(new WildcardQueryNodeProcessor());
     Add(new MultiFieldQueryNodeProcessor());
     Add(new FuzzyQueryNodeProcessor());
     Add(new MatchAllDocsQueryNodeProcessor());
     Add(new OpenRangeQueryNodeProcessor());
     Add(new NumericQueryNodeProcessor());
     Add(new NumericRangeQueryNodeProcessor());
     Add(new LowercaseExpandedTermsQueryNodeProcessor());
     Add(new TermRangeQueryNodeProcessor());
     Add(new AllowLeadingWildcardProcessor());
     Add(new AnalyzerQueryNodeProcessor());
     Add(new PhraseSlopQueryNodeProcessor());
     //add(new GroupQueryNodeProcessor());
     Add(new BooleanQuery2ModifierNodeProcessor());
     Add(new NoChildOptimizationQueryNodeProcessor());
     Add(new RemoveDeletedQueryNodesProcessor());
     Add(new RemoveEmptyNonLeafQueryNodeProcessor());
     Add(new BooleanSingleChildOptimizationQueryNodeProcessor());
     Add(new DefaultPhraseSlopQueryNodeProcessor());
     Add(new BoostQueryNodeProcessor());
     Add(new MultiTermRewriteMethodProcessor());
 }
        /// <summary>
        /// Constructs a <see cref="NumericFieldConfigListener"/> object using the given <see cref="QueryConfigHandler"/>.
        /// </summary>
        /// <param name="config">the <see cref="QueryConfigHandler"/> it will listen too</param>
        public NumericFieldConfigListener(QueryConfigHandler config)
        {
            if (config == null)
            {
                throw new ArgumentException("config cannot be null!");
            }

            this.config = config;
        }
        /// <summary>
        /// <see cref="StandardQueryNodeProcessorPipeline.StandardQueryNodeProcessorPipeline(QueryConfigHandler)"/>
        /// </summary>
        public PrecedenceQueryNodeProcessorPipeline(QueryConfigHandler queryConfig)
            : base(queryConfig)
        {
            for (int i = 0; i < Count; i++)
            {
                if (this[i].GetType().Equals(typeof(BooleanQuery2ModifierNodeProcessor)))
                {
                    RemoveAt(i--);
                }
            }

            Add(new BooleanModifiersQueryNodeProcessor());
        }
Пример #4
0
 public virtual void SetQueryConfigHandler(QueryConfigHandler queryConfigHandler)
 {
     this.queryConfig = queryConfigHandler;
 }
 public FieldDateResolutionFCListener(QueryConfigHandler config)
 {
     this.config = config;
 }