From 5b517c34acde2f10bdb8c68e2b3bc6ba5d49e5cd Mon Sep 17 00:00:00 2001
From: Adrien Grand Note that JavaCC defines lots of public classes, methods and fields
+ * that do not need to be public. These clutter the documentation.
+ * Sorry.
+ * Note that because JavaCC defines a class named Token, org.apache.lucene.analysis.Token
+ * must always be fully qualified in source code in this package.
+ *
+ * NOTE: {@link org.apache.lucene.queryparser.flexible.standard} has an alternative queryparser that matches the syntax of this one, but is more modular,
+ * enabling substantial customization to how a query is created.
+ *
+ * Although Lucene provides the ability to create your own
+ * queries through its API, it also provides a rich query
+ * language through the Query Parser, a lexer which
+ * interprets a string into a Lucene Query using JavaCC.
+ * Generally, the query parser syntax may change from
+ * release to release. This page describes the syntax as of
+ * the current release. If you are using a different
+ * version of Lucene, please consult the copy of
+ * docs/queryparsersyntax.html that was distributed
+ * with the version you are using.
+ *
+ * Before choosing to use the provided Query Parser, please consider the following:
+ * A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.
+ * A Single Term is a single word such as "test" or "hello".
+ * A Phrase is a group of words surrounded by double quotes such as "hello dolly".
+ * Multiple terms can be combined together with Boolean operators to form a more complex query (see below).
+ * Note: The analyzer used to create the index will be used on the terms and phrases in the query string.
+ * So it is important to choose an analyzer that will not interfere with the terms used in the query string.
+ * Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. The field names and default field is implementation specific.
+ * You can search any field by typing the field name followed by a colon ":" and then the term you are looking for.
+ * As an example, let's assume a Lucene index contains two fields, title and text and text is the default field.
+ * If you want to find the document entitled "The Right Way" which contains the text "don't go this way", you can enter:
+ * or
+ * Since text is the default field, the field indicator is not required.
+ * Note: The field is only valid for the term that it directly precedes, so the query
+ * Will only find "The" in the title field. It will find "Right" and "Way" in the default field (in this case the text field).
+ * Lucene supports modifying query terms to provide a wide range of searching options.
+ *
+ * Lucene supports single and multiple character wildcard searches within single terms
+ * (not within phrase queries).
+ * To perform a single character wildcard search use the "?" symbol.
+ * To perform a multiple character wildcard search use the "*" symbol.
+ * The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:
+ * Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:
+ * You can also use the wildcard searches in the middle of a term.
+ * Note: You cannot use a * or ? symbol as the first character of a search.
+ *
+ * Lucene supports regular expression searches matching a pattern between forward slashes "/". The syntax may change across releases, but the current supported
+ * syntax is documented in the {@link org.apache.lucene.util.automaton.RegExp RegExp} class. For example to find documents containing "moat" or "boat":
+ *
+ * Lucene supports fuzzy searches based on Damerau-Levenshtein Distance. To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "roam" use the fuzzy search:
+ * This search will find terms like foam and roams.
+ * An additional (optional) parameter can specify the maximum number of edits allowed. The value is between 0 and 2, For example:
+ * The default that is used if the parameter is not given is 2 edit distances.
+ * Previously, a floating point value was allowed here. This syntax is considered deprecated and will be removed in Lucene 5.0
+ *
+ * Lucene supports finding words are a within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "apache" and "jakarta" within 10 words of each other in a document use the search:
+ * Range Queries allow one to match documents whose field(s) values
+ * are between the lower and upper bound specified by the Range Query.
+ * Range Queries can be inclusive or exclusive of the upper and lower bounds.
+ * Sorting is done lexicographically.
+ * This will find documents whose mod_date fields have values between 20020101 and 20030101, inclusive.
+ * Note that Range Queries are not reserved for date fields. You could also use range queries with non-date fields:
+ * This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen.
+ * Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by
+ * curly brackets.
+ *
+ * Lucene provides the relevance level of matching documents based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.
+ * Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for
+ * and you want the term "jakarta" to be more relevant boost it using the ^ symbol along with the boost factor next to the term.
+ * You would type:
+ * This will make documents with the term jakarta appear more relevant. You can also boost Phrase Terms as in the example:
+ * By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)
+ * Boolean operators allow terms to be combined through logic operators.
+ * Lucene supports AND, "+", OR, NOT and "-" as Boolean operators(Note: Boolean operators must be ALL CAPS).
+ *
+ * The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used.
+ * The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets.
+ * The symbol || can be used in place of the word OR.
+ * To search for documents that contain either "jakarta apache" or just "jakarta" use the query:
+ * or
+ * The AND operator matches documents where both terms exist anywhere in the text of a single document.
+ * This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.
+ * To search for documents that contain "jakarta apache" and "Apache Lucene" use the query:
+ * The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.
+ * To search for documents that must contain "jakarta" and may contain "lucene" use the query:
+ * The NOT operator excludes documents that contain the term after NOT.
+ * This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.
+ * To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:
+ * Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:
+ * The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.
+ * To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:
+ * Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.
+ * To search for either "jakarta" or "apache" and "website" use the query:
+ * This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.
+ * Lucene supports using parentheses to group multiple clauses to a single field.
+ * To search for a title that contains both the word "return" and the phrase "pink panther" use the query:
+ * Lucene supports escaping special characters that are part of the query syntax. The current list special characters are
+ * + - && || ! ( ) { } [ ] ^ " ~ * ? : \ /
+ * To escape these character use the \ before the character. For example to search for (1+1):2 use the query:
+ * Note that JavaCC defines lots of public classes, methods and fields
-that do not need to be public. These clutter the documentation.
-Sorry.
- Note that because JavaCC defines a class named Token, org.apache.lucene.analysis.Token
-must always be fully qualified in source code in this package.
-
- NOTE: {@link org.apache.lucene.queryparser.flexible.standard} has an alternative queryparser that matches the syntax of this one, but is more modular,
-enabling substantial customization to how a query is created.
-
- Although Lucene provides the ability to create your own
- queries through its API, it also provides a rich query
- language through the Query Parser, a lexer which
- interprets a string into a Lucene Query using JavaCC.
- Generally, the query parser syntax may change from
- release to release. This page describes the syntax as of
- the current release. If you are using a different
- version of Lucene, please consult the copy of
- docs/queryparsersyntax.html that was distributed
- with the version you are using.
-
- Before choosing to use the provided Query Parser, please consider the following:
- A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases. A Single Term is a single word such as "test" or "hello". A Phrase is a group of words surrounded by double quotes such as "hello dolly". Multiple terms can be combined together with Boolean operators to form a more complex query (see below). Note: The analyzer used to create the index will be used on the terms and phrases in the query string.
- So it is important to choose an analyzer that will not interfere with the terms used in the query string. Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. The field names and default field is implementation specific. You can search any field by typing the field name followed by a colon ":" and then the term you are looking for. As an example, let's assume a Lucene index contains two fields, title and text and text is the default field.
- If you want to find the document entitled "The Right Way" which contains the text "don't go this way", you can enter: or Since text is the default field, the field indicator is not required. Note: The field is only valid for the term that it directly precedes, so the query Will only find "The" in the title field. It will find "Right" and "Way" in the default field (in this case the text field). Lucene supports modifying query terms to provide a wide range of searching options. Lucene supports single and multiple character wildcard searches within single terms
- (not within phrase queries). To perform a single character wildcard search use the "?" symbol. To perform a multiple character wildcard search use the "*" symbol. The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search: Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search: You can also use the wildcard searches in the middle of a term. Note: You cannot use a * or ? symbol as the first character of a search. Lucene supports regular expression searches matching a pattern between forward slashes "/". The syntax may change across releases, but the current supported
-syntax is documented in the {@link org.apache.lucene.util.automaton.RegExp RegExp} class. For example to find documents containing "moat" or "boat":
- Lucene supports fuzzy searches based on Damerau-Levenshtein Distance. To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "roam" use the fuzzy search: This search will find terms like foam and roams. An additional (optional) parameter can specify the maximum number of edits allowed. The value is between 0 and 2, For example: The default that is used if the parameter is not given is 2 edit distances. Previously, a floating point value was allowed here. This syntax is considered deprecated and will be removed in Lucene 5.0 Lucene supports finding words are a within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "apache" and "jakarta" within 10 words of each other in a document use the search: Range Queries allow one to match documents whose field(s) values
- are between the lower and upper bound specified by the Range Query.
- Range Queries can be inclusive or exclusive of the upper and lower bounds.
- Sorting is done lexicographically. This will find documents whose mod_date fields have values between 20020101 and 20030101, inclusive.
- Note that Range Queries are not reserved for date fields. You could also use range queries with non-date fields: This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen. Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by
- curly brackets. Lucene provides the relevance level of matching documents based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be. Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for and you want the term "jakarta" to be more relevant boost it using the ^ symbol along with the boost factor next to the term.
- You would type: This will make documents with the term jakarta appear more relevant. You can also boost Phrase Terms as in the example: By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2) Boolean operators allow terms to be combined through logic operators.
- Lucene supports AND, "+", OR, NOT and "-" as Boolean operators(Note: Boolean operators must be ALL CAPS). The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used.
- The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets.
- The symbol || can be used in place of the word OR. To search for documents that contain either "jakarta apache" or just "jakarta" use the query: or The AND operator matches documents where both terms exist anywhere in the text of a single document.
- This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND. To search for documents that contain "jakarta apache" and "Apache Lucene" use the query: The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document. To search for documents that must contain "jakarta" and may contain "lucene" use the query: The NOT operator excludes documents that contain the term after NOT.
- This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT. To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query: Note: The NOT operator cannot be used with just one term. For example, the following search will return no results: The "-" or prohibit operator excludes documents that contain the term after the "-" symbol. To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query: Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query. To search for either "jakarta" or "apache" and "website" use the query: This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist. Lucene supports using parentheses to group multiple clauses to a single field. To search for a title that contains both the word "return" and the phrase "pink panther" use the query: Lucene supports escaping special characters that are part of the query syntax. The current list special characters are + - && || ! ( ) { } [ ] ^ " ~ * ? : \ / To escape these character use the \ before the character. For example to search for (1+1):2 use the query:
+ * The package org.apache.lucene.queryParser.builders contains the interface that
+ * builders must implement, it also contain a utility {@link org.apache.lucene.queryparser.flexible.core.builders.QueryTreeBuilder}, which walks the tree
+ * and call the Builder for each node in the tree.
+ * Builder normally convert QueryNode Object into a Lucene Query Object,
+ * and normally it's a one-to-one mapping class.
+ *
+ * But other builders implementations can by written to convert QueryNode objects to other non lucene objects.
+ */
+package org.apache.lucene.queryparser.flexible.core.builders;
+
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/builders/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/builders/package.html
deleted file mode 100644
index f0e329fec48..00000000000
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/builders/package.html
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-The package org.apache.lucene.queryParser.builders contains the interface that
-builders must implement, it also contain a utility {@link org.apache.lucene.queryparser.flexible.core.builders.QueryTreeBuilder}, which walks the tree
-and call the Builder for each node in the tree.
-Builder normally convert QueryNode Object into a Lucene Query Object,
-and normally it's a one-to-one mapping class.
-
-But other builders implementations can by written to convert QueryNode objects to other non lucene objects.
-
-
+ * The package org.apache.lucene.queryparser.flexible.config contains query configuration handler
+ * abstract class that all config handlers should extend.
+ *
+ * See {@link org.apache.lucene.queryparser.flexible.standard.config.StandardQueryConfigHandler} for a reference
+ * implementation.
+ *
+ * The {@link org.apache.lucene.queryparser.flexible.core.config.QueryConfigHandler} and {@link org.apache.lucene.queryparser.flexible.core.config.FieldConfig} are used in the processors to access config
+ * information in a flexible and independent way.
+ * See {@link org.apache.lucene.queryparser.flexible.standard.processors.TermRangeQueryNodeProcessor} for a
+ * reference implementation.
+ */
+package org.apache.lucene.queryparser.flexible.core.config;
+
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/package.html
deleted file mode 100644
index 56dc6b5658b..00000000000
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/package.html
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-The package org.apache.lucene.queryparser.flexible.config contains query configuration handler
-abstract class that all config handlers should extend.
-
-See {@link org.apache.lucene.queryparser.flexible.standard.config.StandardQueryConfigHandler} for a reference
-implementation.
-
-The {@link org.apache.lucene.queryparser.flexible.core.config.QueryConfigHandler} and {@link org.apache.lucene.queryparser.flexible.core.config.FieldConfig} are used in the processors to access config
-information in a flexible and independent way.
-See {@link org.apache.lucene.queryparser.flexible.standard.processors.TermRangeQueryNodeProcessor} for a
-reference implementation.
-
+ * The package org.apache.lucene.queryParser.nodes contains all the basic query nodes. The interface
+ * that represents a query node is {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode}.
+ *
+ * {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode}s are used by the text parser to create a syntax tree.
+ * These nodes are designed to be used by UI or other text parsers.
+ * The default Lucene text parser is {@link org.apache.lucene.queryparser.flexible.standard.parser.StandardSyntaxParser},
+ * it implements Lucene's standard syntax.
+ *
+ * {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} interface should be implemented by all query nodes,
+ * the class {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl} implements {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} and is extended
+ * by all current query node implementations.
+ *
+ * A query node tree can be printed to the a stream, and it generates a pseudo XML representation
+ * with all the nodes.
+ *
+ * A query node tree can also generate a query string that can be parsed back by the original text parser,
+ * at this point only the standard lucene syntax is supported.
+ *
+ * Grouping nodes:
+ *
+ * Leaf Nodes:
+ *
+ * Utility Nodes:
+ *
-The package org.apache.lucene.queryParser.nodes contains all the basic query nodes. The interface
-that represents a query node is {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode}.
-
-{@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode}s are used by the text parser to create a syntax tree.
-These nodes are designed to be used by UI or other text parsers.
-The default Lucene text parser is {@link org.apache.lucene.queryparser.flexible.standard.parser.StandardSyntaxParser},
-it implements Lucene's standard syntax.
-
-{@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} interface should be implemented by all query nodes,
-the class {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl} implements {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} and is extended
-by all current query node implementations.
-
-A query node tree can be printed to the a stream, and it generates a pseudo XML representation
-with all the nodes.
-
-A query node tree can also generate a query string that can be parsed back by the original text parser,
-at this point only the standard lucene syntax is supported.
-
-Grouping nodes:
-Query Parser Syntax
+ *
+ *
+ *
+ *
+ *
+ * Overview
+ *
+ *
+ *
+ *
+ * Terms
+ * Fields
+ * title:"The Right Way" AND text:go
+ * title:"The Right Way" AND go
+ * title:The Right Way
+ * Term Modifiers
+ * Wildcard Searches
+ * te?t
+ * test*
+ * te*t
+ * Regular Expression Searches
+ * /[mb]oat/
+ *
+ * Fuzzy Searches
+ * roam~
+ * roam~1
+ * Proximity Searches
+ * "jakarta apache"~10
+ *
+ * Range Searches
+ * mod_date:[20020101 TO 20030101]
+ * title:{Aida TO Carmen}
+ * Boosting a Term
+ * jakarta apache
+ * jakarta^4 apache
+ * "jakarta apache"^4 "Apache Lucene"
+ * Boolean Operators
+ * OR
+ * "jakarta apache" jakarta
+ * "jakarta apache" OR jakarta
+ *
+ * AND
+ * "jakarta apache" AND "Apache Lucene"
+ *
+ * +
+ * +jakarta lucene
+ *
+ * NOT
+ * "jakarta apache" NOT "Apache Lucene"
+ * NOT "jakarta apache"
+ *
+ * -
+ * "jakarta apache" -"Apache Lucene"
+ * Grouping
+ * (jakarta OR apache) AND website
+ * Field Grouping
+ * title:(+return +"pink panther")
+ * Escaping Special Characters
+ * \(1\+1\)\:2
+ * Query Parser Syntax
-
-
-
-
-
-Overview
-
-
-
-
-
-Terms
-Fields
-title:"The Right Way" AND text:go
-title:"The Right Way" AND go
-title:The Right Way
-Term Modifiers
-Wildcard Searches
-te?t
-test*
-te*t
-Regular Expression Searches
-/[mb]oat/
-
-Fuzzy Searches
-roam~
-roam~1
-Proximity Searches
-"jakarta apache"~10
-
-Range Searches
-mod_date:[20020101 TO 20030101]
-title:{Aida TO Carmen}
-Boosting a Term
-jakarta apache
-jakarta^4 apache
-"jakarta apache"^4 "Apache Lucene"
-Boolean Operators
-OR
-"jakarta apache" jakarta
-"jakarta apache" OR jakarta
-
-AND
-"jakarta apache" AND "Apache Lucene"
-
-+
-+jakarta lucene
-
-NOT
-"jakarta apache" NOT "Apache Lucene"
-NOT "jakarta apache"
-
--
-"jakarta apache" -"Apache Lucene"
-Grouping
-(jakarta OR apache) AND website
-Field Grouping
-title:(+return +"pink panther")
-Escaping Special Characters
-\(1\+1\)\:2
-Query Parser Builders
+ * Query Parser Builders
-Query Configuration Interfaces
+ * Query Configuration Interfaces
-Query Parser Messages
+ *
+ * Messages for the Flexible Query Parser, they use org.apache.lucene.messages.NLS API.
+ */
+package org.apache.lucene.queryparser.flexible.core.messages;
+
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/messages/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/messages/package.html
deleted file mode 100644
index 82b85f40fd9..00000000000
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/messages/package.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-Messages usually used by query parser implementations.
-
-Query Parser Messages
-
-Messages for the Flexible Query Parser, they use org.apache.lucene.messages.NLS API.
-
-
-
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/package-info.java
new file mode 100644
index 00000000000..c9d55eab12c
--- /dev/null
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/package-info.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Query nodes commonly used by query parser implementations.
+ *
+ * Query Nodes
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+package org.apache.lucene.queryparser.flexible.core.nodes;
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/package.html
deleted file mode 100644
index 942e08ac995..00000000000
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/package.html
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
-
-
-Query nodes commonly used by query parser implementations.
-
-Query Nodes
-
-
-
-Leaf Nodes: -
-Utility Nodes: -
+ * This package contains the necessary classes to implement a query parser. + * + *
+ * A query parser is divided in at least 2 phases, text parsing and query building, and one optional phase called query processing. + * + *
+ * The text parsing phase is performed by a text parser, which implements {@link org.apache.lucene.queryparser.flexible.core.parser.SyntaxParser} interface. + * A text parser is responsible to get a query string and convert it to a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree, + * which is an object structure that represents the elements defined in the query string. + * + *
+ * The query processing phase is performed by a query processor, which implements {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessor}. + * A query processor is responsible to perform any processing on a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree. This phase + * 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.flexible.core.nodes.QueryNode} tree. + * The {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree can be either be generated by a text parser or programmatically created. + * + *
+ * The query building phase is performed by a query builder, which implements {@link org.apache.lucene.queryparser.flexible.core.builders.QueryBuilder}. + * A query builder is responsible to convert a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree into an arbitrary object, which + * is usually used to be executed against a search index. + */ +package org.apache.lucene.queryparser.flexible.core; diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/package.html deleted file mode 100644 index e7fc0df51ff..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/package.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -
- - - - -Core classes of the flexible query parser framework. - --This package contains the necessary classes to implement a query parser. -
- --A query parser is divided in at least 2 phases, text parsing and query building, and one optional phase called query processing. -
- --The text parsing phase is performed by a text parser, which implements {@link org.apache.lucene.queryparser.flexible.core.parser.SyntaxParser} interface. -A text parser is responsible to get a query string and convert it to a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree, -which is an object structure that represents the elements defined in the query string. -
- --The query processing phase is performed by a query processor, which implements {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessor}. -A query processor is responsible to perform any processing on a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree. This phase -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.flexible.core.nodes.QueryNode} tree. -The {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree can be either be generated by a text parser or programmatically created. -
- --The query building phase is performed by a query builder, which implements {@link org.apache.lucene.queryparser.flexible.core.builders.QueryBuilder}. -A query builder is responsible to convert a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree into an arbitrary object, which -is usually used to be executed against a search index. -
- - - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/parser/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/parser/package-info.java new file mode 100644 index 00000000000..273138d8762 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/parser/package-info.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Necessary interfaces to implement text parsers. + * + *+ * The package org.apache.lucene.queryparser.flexible.parser contains interfaces + * that should be implemented by the parsers. + * + * Parsers produce QueryNode Trees from a string object. + * These package still needs some work to add support to for multiple parsers. + * + * Features that should be supported for the future, related with the parser: + * - QueryNode tree should be able convertible to any parser syntax. + * - The query syntax should support calling other parsers. + * - QueryNode tree created by multiple parsers. + */ +package org.apache.lucene.queryparser.flexible.core.parser; diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/parser/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/parser/package.html deleted file mode 100644 index 1baeb3131e6..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/parser/package.html +++ /dev/null @@ -1,44 +0,0 @@ - - - -
- - - - -Necessary interfaces to implement text parsers. - --The package org.apache.lucene.queryparser.flexible.parser contains interfaces -that should be implemented by the parsers. - -Parsers produce QueryNode Trees from a string object. -These package still needs some work to add support to for multiple parsers. - -Features that should be supported for the future, related with the parser: -- QueryNode tree should be able convertible to any parser syntax. -- The query syntax should support calling other parsers. -- QueryNode tree created by multiple parsers. - -
-- -
- - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/package-info.java new file mode 100644 index 00000000000..86ce57b5d99 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/package-info.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Interfaces and implementations used by query node processors + * + *+ * The package org.apache.lucene.queryParser.processors contains interfaces + * that should be implemented by every query node processor. + *
+ * The interface that every query node processor should implement is {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessor}. + * A query node processor should be used to process a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree. + * {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} trees can be programmatically created or generated by a + * text parser. See {@link org.apache.lucene.queryparser.flexible.core.parser} for more details about text parsers. + * + *
+ * A query node processor should be used to process a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree. + * {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} trees can be programmatically created or generated by a + * text parser. See {@link org.apache.lucene.queryparser.flexible.core.parser} for more details about text parsers. + * + *
+ * A pipeline of processors can be assembled using {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorPipeline}. + * + *
+ * Implementors may want to extend {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorImpl}, which simplifies + * the implementation, because it walks automatically the {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode}. See + * {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorImpl} for more details. + */ +package org.apache.lucene.queryparser.flexible.core.processors; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/package.html deleted file mode 100644 index 67fe9732334..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/processors/package.html +++ /dev/null @@ -1,57 +0,0 @@ - - - -
- - - - -Interfaces and implementations used by query node processors - --The package org.apache.lucene.queryParser.processors contains interfaces -that should be implemented by every query node processor. -
--The interface that every query node processor should implement is {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessor}. -
--A query node processor should be used to process a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree. -{@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} trees can be programmatically created or generated by a -text parser. See {@link org.apache.lucene.queryparser.flexible.core.parser} for more details about text parsers. -
- --A query node processor should be used to process a {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} tree. -{@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} trees can be programmatically created or generated by a -text parser. See {@link org.apache.lucene.queryparser.flexible.core.parser} for more details about text parsers. -
- --A pipeline of processors can be assembled using {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorPipeline}. -
- --Implementors may want to extend {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorImpl}, which simplifies -the implementation, because it walks automatically the {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode}. See -{@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorImpl} for more details. -
- - - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/package-info.java new file mode 100644 index 00000000000..d5f8e5b16e1 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/package-info.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Utility classes to used with the Query Parser. + *+ * This package contains utility classes used with the query parsers. + */ +package org.apache.lucene.queryparser.flexible.core.util; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/package.html deleted file mode 100644 index 01d0a5a933e..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/package.html +++ /dev/null @@ -1,29 +0,0 @@ - - - -
- - - -Utility classes to used with the Query Parser. --This package contains utility classes used with the query parsers. -
- - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/messages/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/messages/package-info.java new file mode 100644 index 00000000000..07cef021112 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/messages/package-info.java @@ -0,0 +1,90 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * For Native Language Support (NLS), system of software internationalization. + * + *+ * This utility API, adds support for NLS messages in the apache code. + * It is currently used by the lucene "New Flexible Query PArser". + *
+ * Features: + *
+ * Lazy loading of Message Strings + * + *
+ * public class MessagesTestBundle extends NLS { + * + * private static final String BUNDLE_NAME = MessagesTestBundle.class.getName(); + * + * private MessagesTestBundle() { + * // should never be instantiated + * } + * + * static { + * // register all string ids with NLS class and initialize static string + * // values + * NLS.initializeMessages(BUNDLE_NAME, MessagesTestBundle.class); + * } + * + * // static string must match the strings in the property files. + * public static String Q0001E_INVALID_SYNTAX; + * public static String Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION; + * + * // this message is missing from the properties file + * public static String Q0005E_MESSAGE_NOT_IN_BUNDLE; + * } + * + * // Create a message reference + * Message invalidSyntax = new MessageImpl(MessagesTestBundle.Q0001E_INVALID_SYNTAX, "XXX"); + * + * // Do other stuff in the code... + * // when is time to display the message to the user or log the message on a file + * // the message is loaded from the correct bundle + * + * String message1 = invalidSyntax.getLocalizedMessage(); + * String message2 = invalidSyntax.getLocalizedMessage(Locale.JAPANESE); + *+ * + *
+ * Normal loading of Message Strings + * + *
+ * String message1 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION); + * String message2 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION, Locale.JAPANESE); + *+ * + *
+ * The org.apache.lucene.messages.TestNLS junit contains several other examples. + * The TestNLS java code is available from the Apache Lucene code repository. + */ +package org.apache.lucene.queryparser.flexible.messages; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/messages/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/messages/package.html deleted file mode 100644 index 24d41716497..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/messages/package.html +++ /dev/null @@ -1,99 +0,0 @@ - - - -
- - - - -For Native Language Support (NLS), system of software internationalization. - --This utility API, adds support for NLS messages in the apache code. -It is currently used by the lucene "New Flexible Query PArser". -
--Features: -
-Lazy loading of Message Strings - -
- public class MessagesTestBundle extends NLS { - - private static final String BUNDLE_NAME = MessagesTestBundle.class.getName(); - - private MessagesTestBundle() { - // should never be instantiated - } - - static { - // register all string ids with NLS class and initialize static string - // values - NLS.initializeMessages(BUNDLE_NAME, MessagesTestBundle.class); - } - - // static string must match the strings in the property files. - public static String Q0001E_INVALID_SYNTAX; - public static String Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION; - - // this message is missing from the properties file - public static String Q0005E_MESSAGE_NOT_IN_BUNDLE; - } - - // Create a message reference - Message invalidSyntax = new MessageImpl(MessagesTestBundle.Q0001E_INVALID_SYNTAX, "XXX"); - - // Do other stuff in the code... - // when is time to display the message to the user or log the message on a file - // the message is loaded from the correct bundle - - String message1 = invalidSyntax.getLocalizedMessage(); - String message2 = invalidSyntax.getLocalizedMessage(Locale.JAPANESE); -- - -
-Normal loading of Message Strings - -
- String message1 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION); - String message2 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION, Locale.JAPANESE); -- - -
-The org.apache.lucene.messages.TestNLS junit contains several other examples. -The TestNLS java code is available from the Apache Lucene code repository. -
- - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/precedence/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/precedence/package-info.java new file mode 100644 index 00000000000..2d46676ec12 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/precedence/package-info.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Precedence Query Parser Implementation + * + *+ * The Precedence Query Parser extends the Standard Query Parser and enables + * the boolean precedence. So, the query <a AND b OR c AND d> is parsed to + * <(+a +b) (+c +d)> instead of <+a +b +c +d>. + *
+ * Check {@link org.apache.lucene.queryparser.flexible.standard.StandardQueryParser} for more details about the + * supported syntax and query parser functionalities. + */ +package org.apache.lucene.queryparser.flexible.precedence; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/precedence/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/precedence/package.html deleted file mode 100644 index 784aa6cc86f..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/precedence/package.html +++ /dev/null @@ -1,39 +0,0 @@ - - - -
- - - - -Precedence Query Parser Implementation - --The Precedence Query Parser extends the Standard Query Parser and enables -the boolean precedence. So, the query <a AND b OR c AND d> is parsed to -<(+a +b) (+c +d)> instead of <+a +b +c +d>. -
--Check {@link org.apache.lucene.queryparser.flexible.standard.StandardQueryParser} for more details about the -supported syntax and query parser functionalities. -
- - - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/package-info.java new file mode 100644 index 00000000000..2d950107da5 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/package-info.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Standard Lucene Query Node Builders. + * + *+ * The package org.apache.lucene.queryparser.flexible.standard.builders contains all the builders needed + * to build a Lucene Query object from a query node tree. These builders expect the query node tree was + * already processed by the {@link org.apache.lucene.queryparser.flexible.standard.processors.StandardQueryNodeProcessorPipeline}. + *
+ * {@link org.apache.lucene.queryparser.flexible.standard.builders.StandardQueryTreeBuilder} is a builder that already contains a defined map that maps each QueryNode object + * with its respective builder. + */ +package org.apache.lucene.queryparser.flexible.standard.builders; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/package.html deleted file mode 100644 index 53599e4d15b..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/package.html +++ /dev/null @@ -1,37 +0,0 @@ - - - -
- - - - -Standard Lucene Query Node Builders. - --The package org.apache.lucene.queryparser.flexible.standard.builders contains all the builders needed -to build a Lucene Query object from a query node tree. These builders expect the query node tree was -already processed by the {@link org.apache.lucene.queryparser.flexible.standard.processors.StandardQueryNodeProcessorPipeline}. -
--{@link org.apache.lucene.queryparser.flexible.standard.builders.StandardQueryTreeBuilder} is a builder that already contains a defined map that maps each QueryNode object -with its respective builder. -
- - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/package-info.java new file mode 100644 index 00000000000..6f06e796936 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/package-info.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Standard Lucene Query Configuration. + * + *+ * The package org.apache.lucene.queryparser.flexible.standard.config contains the Lucene + * query configuration handler (StandardQueryConfigHandler). This configuration + * handler reproduces almost everything that could be set on the old query parser. + *
+ * StandardQueryConfigHandler is the class that should be used to configure the StandardQueryNodeProcessorPipeline. + */ +package org.apache.lucene.queryparser.flexible.standard.config; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/package.html deleted file mode 100644 index a455c03a145..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/package.html +++ /dev/null @@ -1,36 +0,0 @@ - - - -
- - - - -Standard Lucene Query Configuration. - --The package org.apache.lucene.queryparser.flexible.standard.config contains the Lucene -query configuration handler (StandardQueryConfigHandler). This configuration -handler reproduces almost everything that could be set on the old query parser. -
--StandardQueryConfigHandler is the class that should be used to configure the StandardQueryNodeProcessorPipeline. -
- - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/package-info.java new file mode 100644 index 00000000000..0a9b75a0177 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/package-info.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Standard Lucene Query Nodes. + * + *+ * The package org.apache.lucene.queryparser.flexible.standard.nodes contains QueryNode classes + * that are used specifically for Lucene query node tree. Any other generic QueryNode is + * defined under org.apache.lucene.queryParser.nodes. + */ +package org.apache.lucene.queryparser.flexible.standard.nodes; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/package.html deleted file mode 100644 index c8f9491977d..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/nodes/package.html +++ /dev/null @@ -1,33 +0,0 @@ - - - -
- - - - -Standard Lucene Query Nodes. - --The package org.apache.lucene.queryparser.flexible.standard.nodes contains QueryNode classes -that are used specifically for Lucene query node tree. Any other generic QueryNode is -defined under org.apache.lucene.queryParser.nodes. -
- - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/package-info.java new file mode 100644 index 00000000000..740ca4c2cee --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/package-info.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Implementation of the {@linkplain org.apache.lucene.queryparser.classic Lucene classic query parser} using the flexible query parser frameworks + * + *+ * The old Lucene query parser used to have only one class that performed + * all the parsing operations. In the new query parser structure, the + * parsing was divided in 3 steps: parsing (syntax), processing (semantic) + * and building. + *
+ * The classes contained in the package org.apache.lucene.queryParser.standard + * are used to reproduce the same behavior as the old query parser. + * + *
+ * Check {@link org.apache.lucene.queryparser.flexible.standard.StandardQueryParser} to quick start using the Lucene query parser. + */ +package org.apache.lucene.queryparser.flexible.standard; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/package.html deleted file mode 100644 index 35f8c7cb89c..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/package.html +++ /dev/null @@ -1,43 +0,0 @@ - - - -
- - - - -Implementation of the {@linkplain org.apache.lucene.queryparser.classic Lucene classic query parser} using the flexible query parser frameworks - --The old Lucene query parser used to have only one class that performed -all the parsing operations. In the new query parser structure, the -parsing was divided in 3 steps: parsing (syntax), processing (semantic) -and building. -
--The classes contained in the package org.apache.lucene.queryParser.standard -are used to reproduce the same behavior as the old query parser. -
- --Check {@link org.apache.lucene.queryparser.flexible.standard.StandardQueryParser} to quick start using the Lucene query parser. -
- - - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/package-info.java new file mode 100644 index 00000000000..be72e7f57a3 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/package-info.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + *+ * The package org.apache.lucene.queryparser.flexible.standard.parser contains the query parser. + *
+ * This text parser only performs the syntax validation and creates an QueryNode tree + * from a query string. + */ +package org.apache.lucene.queryparser.flexible.standard.parser; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/package.html deleted file mode 100644 index 766e15f97a9..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/package.html +++ /dev/null @@ -1,35 +0,0 @@ - - - -
- - - - -Lucene Query Parser. - --The package org.apache.lucene.queryparser.flexible.standard.parser contains the query parser. -
--This text parser only performs the syntax validation and creates an QueryNode tree -from a query string. -
- - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/package-info.java new file mode 100644 index 00000000000..ec68c7ef975 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/package-info.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Lucene Query Node Processors. + * + *+ * The package org.apache.lucene.queryparser.flexible.standard.processors contains every processor needed to assembly a pipeline + * that modifies the query node tree according to the actual Lucene queries. + *
+ * These processors are already assembled correctly in the StandardQueryNodeProcessorPipeline. + */ +package org.apache.lucene.queryparser.flexible.standard.processors; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/package.html deleted file mode 100644 index bfa233ddf59..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/package.html +++ /dev/null @@ -1,35 +0,0 @@ - - - -
- - - - -Lucene Query Node Processors. - --The package org.apache.lucene.queryparser.flexible.standard.processors contains every processor needed to assembly a pipeline -that modifies the query node tree according to the actual Lucene queries. -
--These processors are already assembled correctly in the StandardQueryNodeProcessorPipeline. -
- - diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/simple/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/simple/package-info.java new file mode 100644 index 00000000000..926ed1795d5 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/simple/package-info.java @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A simple query parser for human-entered queries. + */ +package org.apache.lucene.queryparser.simple; diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/simple/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/simple/package.html deleted file mode 100644 index 0ea5acf8f4e..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/simple/package.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - A simple query parser for human-entered queries. - - \ No newline at end of file diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/package-info.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/package-info.java new file mode 100644 index 00000000000..78a8e71b794 --- /dev/null +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/package-info.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * This package contains the QueryParser.jj source file for the Surround parser. + *+ * Parsing the text of a query results in a SrndQuery in the + * org.apache.lucene.queryparser.surround.query package. + */ +package org.apache.lucene.queryparser.surround.parser; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/package.html deleted file mode 100644 index 0d462405dca..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/package.html +++ /dev/null @@ -1,28 +0,0 @@ - - - -
-+ * The parser in the org.apache.lucene.queryparser.surround.parser package + * normally generates a SrndQuery. + *
+ * For searching an org.apache.lucene.search.Query is provided by + * the SrndQuery.makeLuceneQueryField method. + * For this, TermQuery, BooleanQuery and SpanQuery are used from Lucene. + */ +package org.apache.lucene.queryparser.surround.query; + diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/package.html b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/package.html deleted file mode 100644 index 2dd7a03a3c9..00000000000 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - -
-