pylucene 3.5.0-3
[pylucene.git] / lucene-java-3.5.0 / lucene / contrib / queryparser / src / java / org / apache / lucene / queryParser / standard / processors / StandardQueryNodeProcessorPipeline.java
1 package org.apache.lucene.queryParser.standard.processors;
2
3 /**
4  * Licensed to the Apache Software Foundation (ASF) under one or more
5  * contributor license agreements.  See the NOTICE file distributed with
6  * this work for additional information regarding copyright ownership.
7  * The ASF licenses this file to You under the Apache License, Version 2.0
8  * (the "License"); you may not use this file except in compliance with
9  * the License.  You may obtain a copy of the License at
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 import org.apache.lucene.queryParser.core.config.QueryConfigHandler;
21 import org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor;
22 import org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline;
23 import org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor;
24 import org.apache.lucene.queryParser.standard.builders.StandardQueryTreeBuilder;
25 import org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler;
26 import org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser;
27 import org.apache.lucene.search.Query;
28
29 /**
30  * This pipeline has all the processors needed to process a query node tree,
31  * generated by {@link StandardSyntaxParser}, already assembled. <br/>
32  * <br/>
33  * The order they are assembled affects the results. <br/>
34  * <br/>
35  * This processor pipeline was designed to work with
36  * {@link StandardQueryConfigHandler}. <br/>
37  * <br/>
38  * The result query node tree can be used to build a {@link Query} object using
39  * {@link StandardQueryTreeBuilder}. <br/>
40  * 
41  * @see StandardQueryTreeBuilder
42  * @see StandardQueryConfigHandler
43  * @see StandardSyntaxParser
44  */
45 public class StandardQueryNodeProcessorPipeline extends
46     QueryNodeProcessorPipeline {
47
48   public StandardQueryNodeProcessorPipeline(QueryConfigHandler queryConfig) {
49     super(queryConfig);
50
51     add(new WildcardQueryNodeProcessor());    
52     add(new MultiFieldQueryNodeProcessor());
53     add(new FuzzyQueryNodeProcessor());
54     add(new MatchAllDocsQueryNodeProcessor());
55     add(new NumericQueryNodeProcessor());
56     add(new NumericRangeQueryNodeProcessor());
57     add(new LowercaseExpandedTermsQueryNodeProcessor());
58     add(new ParametricRangeQueryNodeProcessor());
59     add(new AllowLeadingWildcardProcessor());    
60     add(new AnalyzerQueryNodeProcessor());
61     add(new PhraseSlopQueryNodeProcessor());
62     add(new GroupQueryNodeProcessor());
63     add(new NoChildOptimizationQueryNodeProcessor());
64     add(new RemoveDeletedQueryNodesProcessor());
65     add(new RemoveEmptyNonLeafQueryNodeProcessor());
66     add(new BooleanSingleChildOptimizationQueryNodeProcessor());
67     add(new DefaultPhraseSlopQueryNodeProcessor());
68     add(new BoostQueryNodeProcessor());    
69     add(new MultiTermRewriteMethodProcessor());
70   }
71
72 }