pylucene 3.5.0-3
[pylucene.git] / lucene-java-3.5.0 / lucene / contrib / queryparser / src / java / org / apache / lucene / queryParser / core / package.html
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <!--
3  Licensed to the Apache Software Foundation (ASF) under one or more
4  contributor license agreements.  See the NOTICE file distributed with
5  this work for additional information regarding copyright ownership.
6  The ASF licenses this file to You under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with
8  the License.  You may obtain a copy of the License at
9
10      http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17 -->
18 <html>
19 <head>
20    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
21 </head>
22 <body>
23
24 Contains the core classes of the flexible query parser framework  
25
26 <h2>Flexible Query Parser</h2>
27
28 <p>
29 This package contains the necessary classes to implement a query parser.  
30 </p>
31
32 <p>
33 A query parser is divided in at least 2 phases, text parsing and query building, and one optional phase called query processing.
34 </p>
35
36 <h3>First Phase: Text Parsing</h3>
37 <p>
38 The text parsing phase is performed by a text parser, which implements {@link org.apache.lucene.queryParser.core.parser.SyntaxParser} interface.
39 A text parser is responsible to get a query string and convert it to a {@link org.apache.lucene.queryParser.core.nodes.QueryNode} tree, 
40 which is an object structure that represents the elements defined in the query string.
41 </p>
42
43 <h3>Second (optional) Phase: Query Processing</h3>
44 <p>
45 The query processing phase is performed by a query processor, which implements {@link org.apache.lucene.queryParser.core.processors.QueryNodeProcessor}.
46 A query processor is responsible to perform any processing on a {@link org.apache.lucene.queryParser.core.nodes.QueryNode} tree. This phase
47 is optional and is used only if an extra processing, validation, query expansion, etc needs to be performed in a {@link org.apache.lucene.queryParser.core.nodes.QueryNode} tree.
48 The {@link org.apache.lucene.queryParser.core.nodes.QueryNode} tree can be either be generated by a text parser or programmatically created.
49 </p>
50
51 <h3>Third Phase: Query Building</h3>
52 <p>
53 The query building phase is performed by a query builder, which implements {@link org.apache.lucene.queryParser.core.builders.QueryBuilder}.
54 A query builder is responsible to convert a {@link org.apache.lucene.queryParser.core.nodes.QueryNode} tree into an arbitrary object, which
55 is usually used to be executed against a search index.   
56 </p>
57
58 </body>
59 </html>