LUCENE-6224: cut over more package.htmls

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1658467 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrien Grand 2015-02-09 17:07:39 +00:00
parent c385668a1f
commit 5b517c34ac
50 changed files with 1115 additions and 1253 deletions

View File

@ -0,0 +1,22 @@
/*
* 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.
*/
/**
* QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
*/
package org.apache.lucene.queryparser.analyzing;

View File

@ -1,22 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<body>
QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
</body>
</html>

View File

@ -0,0 +1,305 @@
/*
* 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 implemented with JavaCC.
*
* <p>Note that JavaCC defines lots of public classes, methods and fields
* that do not need to be public.&nbsp; These clutter the documentation.&nbsp;
* Sorry.
* <p>Note that because JavaCC defines a class named <tt>Token</tt>, <tt>org.apache.lucene.analysis.Token</tt>
* must always be fully qualified in source code in this package.
*
* <p><b>NOTE</b>: {@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.
*
* <h2>Query Parser Syntax</h2>
*
* <div id="minitoc-area">
* <ul class="minitoc">
* <li>
* <a href="#Overview">Overview</a>
* </li>
* <li>
* <a href="#Terms">Terms</a>
* </li>
* <li>
* <a href="#Fields">Fields</a>
* </li>
* <li>
* <a href="#Term_Modifiers">Term Modifiers</a>
* <ul class="minitoc">
* <li>
* <a href="#Wildcard_Searches">Wildcard Searches</a>
* </li>
* <li>
* <a href="#Regexp_Searches">Regular expression Searches</a>
* </li>
* <li>
* <a href="#Fuzzy_Searches">Fuzzy Searches</a>
* </li>
* <li>
* <a href="#Proximity_Searches">Proximity Searches</a>
* </li>
* <li>
* <a href="#Range_Searches">Range Searches</a>
* </li>
* <li>
* <a href="#Boosting_a_Term">Boosting a Term</a>
* </li>
* </ul>
* </li>
* <li>
* <a href="#Boolean_operators">Boolean Operators</a>
* <ul class="minitoc">
* <li>
* <a href="#OR">OR</a>
* </li>
* <li>
* <a href="#AND">AND</a>
* </li>
* <li>
* <a href="#+">+</a>
* </li>
* <li>
* <a href="#NOT">NOT</a>
* </li>
* <li>
* <a href="#-">-</a>
* </li>
* </ul>
* </li>
* <li>
* <a href="#Grouping">Grouping</a>
* </li>
* <li>
* <a href="#Field_Grouping">Field Grouping</a>
* </li>
* <li>
* <a href="#Escaping_Special_Characters">Escaping Special Characters</a>
* </li>
* </ul>
* </div>
*
* <a name="N10013"></a><a name="Overview"></a>
* <h2 class="boxed">Overview</h2>
* <div class="section">
* <p>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.
* <p>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
* <span class="codefrag">docs/queryparsersyntax.html</span> that was distributed
* with the version you are using.
* <p>
* Before choosing to use the provided Query Parser, please consider the following:
* <ol>
*
* <li>If you are programmatically generating a query string and then
* parsing it with the query parser then you should seriously consider building
* your queries directly with the query API. In other words, the query
* parser is designed for human-entered text, not for program-generated
* text.</li>
*
*
* <li>Untokenized fields are best added directly to queries, and not
* through the query parser. If a field's values are generated programmatically
* by the application, then so should query clauses for this field.
* An analyzer, which the query parser uses, is designed to convert human-entered
* text to terms. Program-generated values, like dates, keywords, etc.,
* should be consistently program-generated.</li>
*
*
* <li>In a query form, fields which are general text should use the query
* parser. All others, such as date ranges, keywords, etc. are better added
* directly through the query API. A field with a limit set of values,
* that can be specified with a pull-down menu should not be added to a
* query string which is subsequently parsed, but rather added as a
* TermQuery clause.</li>
*
* </ol>
*
* </div>
*
*
* <a name="N10032"></a><a name="Terms"></a>
* <h2 class="boxed">Terms</h2>
* <div class="section">
* <p>A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.
* <p>A Single Term is a single word such as "test" or "hello".
* <p>A Phrase is a group of words surrounded by double quotes such as "hello dolly".
* <p>Multiple terms can be combined together with Boolean operators to form a more complex query (see below).
* <p>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.
* </div>
*
*
* <a name="N10048"></a><a name="Fields"></a>
* <h2 class="boxed">Fields</h2>
* <div class="section">
* <p>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.
* <p>You can search any field by typing the field name followed by a colon ":" and then the term you are looking for.
* <p>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:
* <pre class="code">title:"The Right Way" AND text:go</pre>
* <p>or
* <pre class="code">title:"The Right Way" AND go</pre>
* <p>Since text is the default field, the field indicator is not required.
* <p>Note: The field is only valid for the term that it directly precedes, so the query
* <pre class="code">title:The Right Way</pre>
* <p>Will only find "The" in the title field. It will find "Right" and "Way" in the default field (in this case the text field).
* </div>
*
*
* <a name="N1006D"></a><a name="Term_Modifiers"></a>
* <h2 class="boxed">Term Modifiers</h2>
* <div class="section">
* <p>Lucene supports modifying query terms to provide a wide range of searching options.
* <a name="N10076"></a><a name="Wildcard_Searches"></a>
* <h3 class="boxed">Wildcard Searches</h3>
* <p>Lucene supports single and multiple character wildcard searches within single terms
* (not within phrase queries).
* <p>To perform a single character wildcard search use the "?" symbol.
* <p>To perform a multiple character wildcard search use the "*" symbol.
* <p>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:
* <pre class="code">te?t</pre>
* <p>Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:
* <pre class="code">test*</pre>
* <p>You can also use the wildcard searches in the middle of a term.
* <pre class="code">te*t</pre>
* <p>Note: You cannot use a * or ? symbol as the first character of a search.
* <a name="Regexp_Searches"></a>
* <h3 class="boxed">Regular Expression Searches</h3>
* <p>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":
*
* <pre class="code">/[mb]oat/</pre>
* <a name="N1009B"></a><a name="Fuzzy_Searches"></a>
* <h3 class="boxed">Fuzzy Searches</h3>
* <p>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:
* <pre class="code">roam~</pre>
* <p>This search will find terms like foam and roams.
* <p>An additional (optional) parameter can specify the maximum number of edits allowed. The value is between 0 and 2, For example:
* <pre class="code">roam~1</pre>
* <p>The default that is used if the parameter is not given is 2 edit distances.
* <p>Previously, a floating point value was allowed here. This syntax is considered deprecated and will be removed in Lucene 5.0
* <a name="N100B4"></a><a name="Proximity_Searches"></a>
* <h3 class="boxed">Proximity Searches</h3>
* <p>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:
* <pre class="code">"jakarta apache"~10</pre>
* <a name="N100C1"></a><a name="Range_Searches"></a>
* <h3 class="boxed">Range Searches</h3>
* <p>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.
* <pre class="code">mod_date:[20020101 TO 20030101]</pre>
* <p>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:
* <pre class="code">title:{Aida TO Carmen}</pre>
* <p>This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen.
* <p>Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by
* curly brackets.
* <a name="N100DA"></a><a name="Boosting_a_Term"></a>
* <h3 class="boxed">Boosting a Term</h3>
* <p>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.
* <p>Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for
* <pre class="code">jakarta apache</pre>
* <p>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:
* <pre class="code">jakarta^4 apache</pre>
* <p>This will make documents with the term jakarta appear more relevant. You can also boost Phrase Terms as in the example:
* <pre class="code">"jakarta apache"^4 "Apache Lucene"</pre>
* <p>By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)
* </div>
*
*
*
* <a name="N100FA"></a><a name="Boolean_operators"></a>
* <h2 class="boxed">Boolean Operators</h2>
* <div class="section">
* <p>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).
* <a name="N10103"></a><a name="OR"></a>
* <h3 class="boxed">OR</h3>
* <p>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.
* <p>To search for documents that contain either "jakarta apache" or just "jakarta" use the query:
* <pre class="code">"jakarta apache" jakarta</pre>
* <p>or
* <pre class="code">"jakarta apache" OR jakarta</pre>
* <a name="N10116"></a><a name="AND"></a>
* <h3 class="boxed">AND</h3>
* <p>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 &amp;&amp; can be used in place of the word AND.
* <p>To search for documents that contain "jakarta apache" and "Apache Lucene" use the query:
* <pre class="code">"jakarta apache" AND "Apache Lucene"</pre>
* <a name="N10126"></a>
* <h3 class="boxed">+</h3>
* <p>The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.
* <p>To search for documents that must contain "jakarta" and may contain "lucene" use the query:
* <pre class="code">+jakarta lucene</pre>
* <a name="N10136"></a><a name="NOT"></a>
* <h3 class="boxed">NOT</h3>
* <p>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.
* <p>To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:
* <pre class="code">"jakarta apache" NOT "Apache Lucene"</pre>
* <p>Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:
* <pre class="code">NOT "jakarta apache"</pre>
* <a name="N1014C"></a>
* <h3 class="boxed">-</h3>
* <p>The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.
* <p>To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:
* <pre class="code">"jakarta apache" -"Apache Lucene"</pre>
* </div>
*
*
* <a name="N1015D"></a><a name="Grouping"></a>
* <h2 class="boxed">Grouping</h2>
* <div class="section">
* <p>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.
* <p>To search for either "jakarta" or "apache" and "website" use the query:
* <pre class="code">(jakarta OR apache) AND website</pre>
* <p>This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.
* </div>
*
*
* <a name="N10170"></a><a name="Field_Grouping"></a>
* <h2 class="boxed">Field Grouping</h2>
* <div class="section">
* <p>Lucene supports using parentheses to group multiple clauses to a single field.
* <p>To search for a title that contains both the word "return" and the phrase "pink panther" use the query:
* <pre class="code">title:(+return +"pink panther")</pre>
* </div>
*
*
* <a name="N10180"></a><a name="Escaping_Special_Characters"></a>
* <h2 class="boxed">Escaping Special Characters</h2>
* <div class="section">
* <p>Lucene supports escaping special characters that are part of the query syntax. The current list special characters are
* <p>+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \ /
* <p>To escape these character use the \ before the character. For example to search for (1+1):2 use the query:
* <pre class="code">\(1\+1\)\:2</pre>
* </div>
*/
package org.apache.lucene.queryparser.classic;

View File

@ -1,312 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
A simple query parser implemented with JavaCC.
<p>Note that JavaCC defines lots of public classes, methods and fields
that do not need to be public.&nbsp; These clutter the documentation.&nbsp;
Sorry.
<p>Note that because JavaCC defines a class named <tt>Token</tt>, <tt>org.apache.lucene.analysis.Token</tt>
must always be fully qualified in source code in this package.
<p><b>NOTE</b>: {@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.
<h2>Query Parser Syntax</h2>
<div id="minitoc-area">
<ul class="minitoc">
<li>
<a href="#Overview">Overview</a>
</li>
<li>
<a href="#Terms">Terms</a>
</li>
<li>
<a href="#Fields">Fields</a>
</li>
<li>
<a href="#Term_Modifiers">Term Modifiers</a>
<ul class="minitoc">
<li>
<a href="#Wildcard_Searches">Wildcard Searches</a>
</li>
<li>
<a href="#Regexp_Searches">Regular expression Searches</a>
</li>
<li>
<a href="#Fuzzy_Searches">Fuzzy Searches</a>
</li>
<li>
<a href="#Proximity_Searches">Proximity Searches</a>
</li>
<li>
<a href="#Range_Searches">Range Searches</a>
</li>
<li>
<a href="#Boosting_a_Term">Boosting a Term</a>
</li>
</ul>
</li>
<li>
<a href="#Boolean_operators">Boolean Operators</a>
<ul class="minitoc">
<li>
<a href="#OR">OR</a>
</li>
<li>
<a href="#AND">AND</a>
</li>
<li>
<a href="#+">+</a>
</li>
<li>
<a href="#NOT">NOT</a>
</li>
<li>
<a href="#-">-</a>
</li>
</ul>
</li>
<li>
<a href="#Grouping">Grouping</a>
</li>
<li>
<a href="#Field_Grouping">Field Grouping</a>
</li>
<li>
<a href="#Escaping_Special_Characters">Escaping Special Characters</a>
</li>
</ul>
</div>
<a name="N10013"></a><a name="Overview"></a>
<h2 class="boxed">Overview</h2>
<div class="section">
<p>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.
</p>
<p>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
<span class="codefrag">docs/queryparsersyntax.html</span> that was distributed
with the version you are using.
</p>
<p>
Before choosing to use the provided Query Parser, please consider the following:
<ol>
<li>If you are programmatically generating a query string and then
parsing it with the query parser then you should seriously consider building
your queries directly with the query API. In other words, the query
parser is designed for human-entered text, not for program-generated
text.</li>
<li>Untokenized fields are best added directly to queries, and not
through the query parser. If a field's values are generated programmatically
by the application, then so should query clauses for this field.
An analyzer, which the query parser uses, is designed to convert human-entered
text to terms. Program-generated values, like dates, keywords, etc.,
should be consistently program-generated.</li>
<li>In a query form, fields which are general text should use the query
parser. All others, such as date ranges, keywords, etc. are better added
directly through the query API. A field with a limit set of values,
that can be specified with a pull-down menu should not be added to a
query string which is subsequently parsed, but rather added as a
TermQuery clause.</li>
</ol>
</p>
</div>
<a name="N10032"></a><a name="Terms"></a>
<h2 class="boxed">Terms</h2>
<div class="section">
<p>A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.</p>
<p>A Single Term is a single word such as "test" or "hello".</p>
<p>A Phrase is a group of words surrounded by double quotes such as "hello dolly".</p>
<p>Multiple terms can be combined together with Boolean operators to form a more complex query (see below).</p>
<p>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.</p>
</div>
<a name="N10048"></a><a name="Fields"></a>
<h2 class="boxed">Fields</h2>
<div class="section">
<p>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.</p>
<p>You can search any field by typing the field name followed by a colon ":" and then the term you are looking for. </p>
<p>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: </p>
<pre class="code">title:"The Right Way" AND text:go</pre>
<p>or</p>
<pre class="code">title:"The Right Way" AND go</pre>
<p>Since text is the default field, the field indicator is not required.</p>
<p>Note: The field is only valid for the term that it directly precedes, so the query</p>
<pre class="code">title:The Right Way</pre>
<p>Will only find "The" in the title field. It will find "Right" and "Way" in the default field (in this case the text field). </p>
</div>
<a name="N1006D"></a><a name="Term_Modifiers"></a>
<h2 class="boxed">Term Modifiers</h2>
<div class="section">
<p>Lucene supports modifying query terms to provide a wide range of searching options.</p>
<a name="N10076"></a><a name="Wildcard_Searches"></a>
<h3 class="boxed">Wildcard Searches</h3>
<p>Lucene supports single and multiple character wildcard searches within single terms
(not within phrase queries).</p>
<p>To perform a single character wildcard search use the "?" symbol.</p>
<p>To perform a multiple character wildcard search use the "*" symbol.</p>
<p>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:</p>
<pre class="code">te?t</pre>
<p>Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search: </p>
<pre class="code">test*</pre>
<p>You can also use the wildcard searches in the middle of a term.</p>
<pre class="code">te*t</pre>
<p>Note: You cannot use a * or ? symbol as the first character of a search.</p>
<a name="Regexp_Searches"></a>
<h3 class="boxed">Regular Expression Searches</h3>
<p>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":
</p>
<pre class="code">/[mb]oat/</pre>
<a name="N1009B"></a><a name="Fuzzy_Searches"></a>
<h3 class="boxed">Fuzzy Searches</h3>
<p>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: </p>
<pre class="code">roam~</pre>
<p>This search will find terms like foam and roams.</p>
<p>An additional (optional) parameter can specify the maximum number of edits allowed. The value is between 0 and 2, For example:</p>
<pre class="code">roam~1</pre>
<p>The default that is used if the parameter is not given is 2 edit distances.</p>
<p>Previously, a floating point value was allowed here. This syntax is considered deprecated and will be removed in Lucene 5.0</p>
<a name="N100B4"></a><a name="Proximity_Searches"></a>
<h3 class="boxed">Proximity Searches</h3>
<p>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: </p>
<pre class="code">"jakarta apache"~10</pre>
<a name="N100C1"></a><a name="Range_Searches"></a>
<h3 class="boxed">Range Searches</h3>
<p>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.</p>
<pre class="code">mod_date:[20020101 TO 20030101]</pre>
<p>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:</p>
<pre class="code">title:{Aida TO Carmen}</pre>
<p>This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen.</p>
<p>Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by
curly brackets.</p>
<a name="N100DA"></a><a name="Boosting_a_Term"></a>
<h3 class="boxed">Boosting a Term</h3>
<p>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.</p>
<p>Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for</p>
<pre class="code">jakarta apache</pre>
<p>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:</p>
<pre class="code">jakarta^4 apache</pre>
<p>This will make documents with the term jakarta appear more relevant. You can also boost Phrase Terms as in the example: </p>
<pre class="code">"jakarta apache"^4 "Apache Lucene"</pre>
<p>By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)</p>
</div>
<a name="N100FA"></a><a name="Boolean_operators"></a>
<h2 class="boxed">Boolean Operators</h2>
<div class="section">
<p>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).</p>
<a name="N10103"></a><a name="OR"></a>
<h3 class="boxed">OR</h3>
<p>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.</p>
<p>To search for documents that contain either "jakarta apache" or just "jakarta" use the query:</p>
<pre class="code">"jakarta apache" jakarta</pre>
<p>or</p>
<pre class="code">"jakarta apache" OR jakarta</pre>
<a name="N10116"></a><a name="AND"></a>
<h3 class="boxed">AND</h3>
<p>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 &amp;&amp; can be used in place of the word AND.</p>
<p>To search for documents that contain "jakarta apache" and "Apache Lucene" use the query: </p>
<pre class="code">"jakarta apache" AND "Apache Lucene"</pre>
<a name="N10126"></a><a name="+"></a>
<h3 class="boxed">+</h3>
<p>The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.</p>
<p>To search for documents that must contain "jakarta" and may contain "lucene" use the query:</p>
<pre class="code">+jakarta lucene</pre>
<a name="N10136"></a><a name="NOT"></a>
<h3 class="boxed">NOT</h3>
<p>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.</p>
<p>To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query: </p>
<pre class="code">"jakarta apache" NOT "Apache Lucene"</pre>
<p>Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:</p>
<pre class="code">NOT "jakarta apache"</pre>
<a name="N1014C"></a><a name="-"></a>
<h3 class="boxed">-</h3>
<p>The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.</p>
<p>To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query: </p>
<pre class="code">"jakarta apache" -"Apache Lucene"</pre>
</div>
<a name="N1015D"></a><a name="Grouping"></a>
<h2 class="boxed">Grouping</h2>
<div class="section">
<p>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.</p>
<p>To search for either "jakarta" or "apache" and "website" use the query:</p>
<pre class="code">(jakarta OR apache) AND website</pre>
<p>This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.</p>
</div>
<a name="N10170"></a><a name="Field_Grouping"></a>
<h2 class="boxed">Field Grouping</h2>
<div class="section">
<p>Lucene supports using parentheses to group multiple clauses to a single field.</p>
<p>To search for a title that contains both the word "return" and the phrase "pink panther" use the query:</p>
<pre class="code">title:(+return +"pink panther")</pre>
</div>
<a name="N10180"></a><a name="Escaping_Special_Characters"></a>
<h2 class="boxed">Escaping Special Characters</h2>
<div class="section">
<p>Lucene supports escaping special characters that are part of the query syntax. The current list special characters are</p>
<p>+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \ /</p>
<p>To escape these character use the \ before the character. For example to search for (1+1):2 use the query:</p>
<pre class="code">\(1\+1\)\:2</pre>
</div>
</body>
</html>

View File

@ -0,0 +1,22 @@
/*
* 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.
*/
/**
* QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
*/
package org.apache.lucene.queryparser.complexPhrase;

View File

@ -1,22 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<body>
QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
</body>
</html>

View File

@ -0,0 +1,22 @@
/*
* 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.
*/
/**
* Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
*/
package org.apache.lucene.queryparser.ext;

View File

@ -1,22 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html><head></head>
<body>
Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
</body>
</html>

View File

@ -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.
*/
/**
* Necessary classes to implement query builders.
*
* <h2>Query Parser Builders</h2>
* <p>
* The package <tt>org.apache.lucene.queryParser.builders</tt> 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;

View File

@ -1,39 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Necessary classes to implement query builders.
<h2>Query Parser Builders</h2>
<p>
The package <tt>org.apache.lucene.queryParser.builders</tt> 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.
</p>
<p>
</p>
</body>
</html>

View File

@ -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.
*/
/**
* Base classes used to configure the query processing.
*
* <h2>Query Configuration Interfaces</h2>
* <p>
* The package <tt>org.apache.lucene.queryparser.flexible.config</tt> contains query configuration handler
* abstract class that all config handlers should extend.
* <p>
* See {@link org.apache.lucene.queryparser.flexible.standard.config.StandardQueryConfigHandler} for a reference
* implementation.
* <p>
* 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;

View File

@ -1,43 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Base classes used to configure the query processing.
<h2>Query Configuration Interfaces</h2>
<p>
The package <tt>org.apache.lucene.queryparser.flexible.config</tt> contains query configuration handler
abstract class that all config handlers should extend.
</p>
<p>
See {@link org.apache.lucene.queryparser.flexible.standard.config.StandardQueryConfigHandler} for a reference
implementation.
</p>
<p>
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.
</p>
</body>
</html>

View File

@ -0,0 +1,26 @@
/*
* 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.
*/
/**
* Messages usually used by query parser implementations.
*
* <h2>Query Parser Messages</h2>
*
* Messages for the Flexible Query Parser, they use <tt>org.apache.lucene.messages.NLS</tt> API.
*/
package org.apache.lucene.queryparser.flexible.core.messages;

View File

@ -1,31 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Messages usually used by query parser implementations.
<h2>Query Parser Messages</h2>
Messages for the Flexible Query Parser, they use <tt>org.apache.lucene.messages.NLS</tt> API.
</body>
</html>

View File

@ -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.
*
* <h2>Query Nodes</h2>
* <p>
* The package <tt>org.apache.lucene.queryParser.nodes</tt> contains all the basic query nodes. The interface
* that represents a query node is {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode}.
* <p>
* {@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.
* <p>
* {@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.
* <p>
* A query node tree can be printed to the a stream, and it generates a pseudo XML representation
* with all the nodes.
* </p>
* <p>
* 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.
* <p>
* Grouping nodes:
* <ul>
* <li>AndQueryNode - used for AND operator</li>
* <li>AnyQueryNode - used for ANY operator</li>
* <li>OrQueryNode - used for OR operator</li>
* <li>BooleanQueryNode - used when no operator is specified</li>
* <li>ModifierQueryNode - used for modifier operator</li>
* <li>GroupQueryNode - used for parenthesis</li>
* <li>BoostQueryNode - used for boost operator</li>
* <li>SlopQueryNode - phrase slop</li>
* <li>FuzzyQueryNode - fuzzy node</li>
* <li>TermRangeQueryNode - used for parametric field:[low_value TO high_value]</li>
* <li>ProximityQueryNode - used for proximity search</li>
* <li>NumericRangeQueryNode - used for numeric range search</li>
* <li>TokenizedPhraseQueryNode - used by tokenizers/lemmatizers/analyzers for phrases/autophrases</li>
* </ul>
* <p>
* Leaf Nodes:
* <ul>
* <li>FieldQueryNode - field/value node</li>
* <li>NumericQueryNode - used for numeric search</li>
* <li>PathQueryNode - {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} object used with path-like queries</li>
* <li>OpaqueQueryNode - Used as for part of the query that can be parsed by other parsers. schema/value</li>
* <li>PrefixWildcardQueryNode - non-phrase wildcard query</li>
* <li>QuotedFieldQUeryNode - regular phrase node</li>
* <li>WildcardQueryNode - non-phrase wildcard query</li>
* </ul>
* <p>
* Utility Nodes:
* <ul>
* <li>DeletedQueryNode - used by processors on optimizations</li>
* <li>MatchAllDocsQueryNode - used by processors on optimizations</li>
* <li>MatchNoDocsQueryNode - used by processors on optimizations</li>
* <li>NoTokenFoundQueryNode - used by tokenizers/lemmatizers/analyzers</li>
* </ul>
*/
package org.apache.lucene.queryparser.flexible.core.nodes;

View File

@ -1,90 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Query nodes commonly used by query parser implementations.
<h2>Query Nodes</h2>
<p>
The package <tt>org.apache.lucene.queryParser.nodes</tt> contains all the basic query nodes. The interface
that represents a query node is {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode}.
</p>
<p>
{@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.
</p>
<p>
{@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.
</p>
<p>
A query node tree can be printed to the a stream, and it generates a pseudo XML representation
with all the nodes.
</p>
<p>
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.
</p>
<p>
Grouping nodes:
<ul>
<li>AndQueryNode - used for AND operator</li>
<li>AnyQueryNode - used for ANY operator</li>
<li>OrQueryNode - used for OR operator</li>
<li>BooleanQueryNode - used when no operator is specified</li>
<li>ModifierQueryNode - used for modifier operator</li>
<li>GroupQueryNode - used for parenthesis</li>
<li>BoostQueryNode - used for boost operator</li>
<li>SlopQueryNode - phrase slop</li>
<li>FuzzyQueryNode - fuzzy node</li>
<li>TermRangeQueryNode - used for parametric field:[low_value TO high_value]</li>
<li>ProximityQueryNode - used for proximity search</li>
<li>NumericRangeQueryNode - used for numeric range search</li>
<li>TokenizedPhraseQueryNode - used by tokenizers/lemmatizers/analyzers for phrases/autophrases</li>
</ul>
</p>
<p>
Leaf Nodes:
<ul>
<li>FieldQueryNode - field/value node</li>
<li>NumericQueryNode - used for numeric search</li>
<li>PathQueryNode - {@link org.apache.lucene.queryparser.flexible.core.nodes.QueryNode} object used with path-like queries</li>
<li>OpaqueQueryNode - Used as for part of the query that can be parsed by other parsers. schema/value</li>
<li>PrefixWildcardQueryNode - non-phrase wildcard query</li>
<li>QuotedFieldQUeryNode - regular phrase node</li>
<li>WildcardQueryNode - non-phrase wildcard query</li>
</ul>
</p>
<p>
Utility Nodes:
<ul>
<li>DeletedQueryNode - used by processors on optimizations</li>
<li>MatchAllDocsQueryNode - used by processors on optimizations</li>
<li>MatchNoDocsQueryNode - used by processors on optimizations</li>
<li>NoTokenFoundQueryNode - used by tokenizers/lemmatizers/analyzers</li>
</ul>
</p>
</body>
</html>

View File

@ -0,0 +1,48 @@
/*
* 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.
*/
/**
* Core classes of the flexible query parser framework.
*
* <h2>Flexible Query Parser</h2>
*
* <p>
* This package contains the necessary classes to implement a query parser.
*
* <p>
* A query parser is divided in at least 2 phases, text parsing and query building, and one optional phase called query processing.
*
* <h3>First Phase: Text Parsing</h3>
* <p>
* 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.
*
* <h3>Second (optional) Phase: Query Processing</h3>
* <p>
* 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.
*
* <h3>Third Phase: Query Building</h3>
* <p>
* 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;

View File

@ -1,59 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Core classes of the flexible query parser framework.
<h2>Flexible Query Parser</h2>
<p>
This package contains the necessary classes to implement a query parser.
</p>
<p>
A query parser is divided in at least 2 phases, text parsing and query building, and one optional phase called query processing.
</p>
<h3>First Phase: Text Parsing</h3>
<p>
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.
</p>
<h3>Second (optional) Phase: Query Processing</h3>
<p>
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.
</p>
<h3>Third Phase: Query Building</h3>
<p>
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.
</p>
</body>
</html>

View File

@ -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.
*
* <h2>Parser</h2>
* <p>
* The package <tt>org.apache.lucene.queryparser.flexible.parser</tt> 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;

View File

@ -1,44 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Necessary interfaces to implement text parsers.
<h2>Parser</h2>
<p>
The package <tt>org.apache.lucene.queryparser.flexible.parser</tt> 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.
</p>
<p>
</p>
</body>
</html>

View File

@ -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
*
* <h2>Query Node Processors</h2>
* <p>
* The package <tt>org.apache.lucene.queryParser.processors</tt> contains interfaces
* that should be implemented by every query node processor.
* <p>
* 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.
*
* <p>
* 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.
*
* <p>
* A pipeline of processors can be assembled using {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorPipeline}.
*
* <p>
* 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;

View File

@ -1,57 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Interfaces and implementations used by query node processors
<h2>Query Node Processors</h2>
<p>
The package <tt>org.apache.lucene.queryParser.processors</tt> contains interfaces
that should be implemented by every query node processor.
</p>
<p>
The interface that every query node processor should implement is {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessor}.
</p>
<p>
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.
</p>
<p>
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.
</p>
<p>
A pipeline of processors can be assembled using {@link org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorPipeline}.
</p>
<p>
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.
</p>
</body>
</html>

View File

@ -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.
* <h2>Utility classes to used with the Query Parser</h2>
* <p>
* This package contains utility classes used with the query parsers.
*/
package org.apache.lucene.queryparser.flexible.core.util;

View File

@ -1,29 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Utility classes to used with the Query Parser.
<h2>Utility classes to used with the Query Parser</h2>
<p>
This package contains utility classes used with the query parsers.
</p>
</body>
</html>

View File

@ -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.
*
* <h2>NLS message API</h2>
* <p>
* This utility API, adds support for NLS messages in the apache code.
* It is currently used by the lucene "New Flexible Query PArser".
* <p>
* Features:
* <ol>
* <li>Message reference in the code, using static Strings</li>
* <li>Message resource validation at class load time, for easier debugging</li>
* <li>Allows for message IDs to be re-factored using eclipse or other code re-factor tools</li>
* <li>Allows for reference count on messages, just like code</li>
* <li>Lazy loading of Message Strings</li>
* <li>Normal loading Message Strings</li>
* </ol>
*
* <br>
* <br>
* <p>
* Lazy loading of Message Strings
*
* <pre class="prettyprint">
* 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);
* </pre>
*
* <br>
* <br>
* <p>
* Normal loading of Message Strings
*
* <pre class="prettyprint">
* String message1 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION);
* String message2 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION, Locale.JAPANESE);
* </pre>
*
* <p>
* 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;

View File

@ -1,99 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
For Native Language Support (NLS), system of software internationalization.
<h2>NLS message API</h2>
<p>
This utility API, adds support for NLS messages in the apache code.
It is currently used by the lucene "New Flexible Query PArser".
</p>
<p>
Features:
<ol>
<li>Message reference in the code, using static Strings</li>
<li>Message resource validation at class load time, for easier debugging</li>
<li>Allows for message IDs to be re-factored using eclipse or other code re-factor tools</li>
<li>Allows for reference count on messages, just like code</li>
<li>Lazy loading of Message Strings</li>
<li>Normal loading Message Strings</li>
</ol>
</p>
<br/>
<br/>
<p>
Lazy loading of Message Strings
<pre class="prettyprint">
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);
</pre>
</p>
<br/>
<br/>
<p>
Normal loading of Message Strings
<pre class="prettyprint">
String message1 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION);
String message2 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION, Locale.JAPANESE);
</pre>
</p>
<p>
The org.apache.lucene.messages.TestNLS junit contains several other examples.
The TestNLS java code is available from the Apache Lucene code repository.
</p>
</body>
</html>

View File

@ -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
*
* <h2>Lucene Precedence Query Parser</h2>
*
* <p>
* The Precedence Query Parser extends the Standard Query Parser and enables
* the boolean precedence. So, the query &lt;a AND b OR c AND d&gt; is parsed to
* &lt;(+a +b) (+c +d)&gt; instead of &lt;+a +b +c +d&gt;.
* <p>
* 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;

View File

@ -1,39 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Precedence Query Parser Implementation
<h2>Lucene Precedence Query Parser</h2>
<p>
The Precedence Query Parser extends the Standard Query Parser and enables
the boolean precedence. So, the query &lt;a AND b OR c AND d&gt; is parsed to
&lt;(+a +b) (+c +d)&gt; instead of &lt;+a +b +c +d&gt;.
</p>
<p>
Check {@link org.apache.lucene.queryparser.flexible.standard.StandardQueryParser} for more details about the
supported syntax and query parser functionalities.
</p>
</body>
</html>

View File

@ -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.
*
* <h2>Standard Lucene Query Node Builders</h2>
* <p>
* 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}.
* <p>
* {@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;

View File

@ -1,37 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Standard Lucene Query Node Builders.
<h2>Standard Lucene Query Node Builders</h2>
<p>
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}.
</p>
<p>
{@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.
</p>
</body>
</html>

View File

@ -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.
*
* <h2>Standard Lucene Query Configuration</h2>
* <p>
* 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.
* <p>
* StandardQueryConfigHandler is the class that should be used to configure the StandardQueryNodeProcessorPipeline.
*/
package org.apache.lucene.queryparser.flexible.standard.config;

View File

@ -1,36 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Standard Lucene Query Configuration.
<h2>Standard Lucene Query Configuration</h2>
<p>
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.
</p>
<p>
StandardQueryConfigHandler is the class that should be used to configure the StandardQueryNodeProcessorPipeline.
</p>
</body>
</html>

View File

@ -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.
*
* <h2>Standard Lucene Query Nodes</h2>
* <p>
* 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;

View File

@ -1,33 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Standard Lucene Query Nodes.
<h2>Standard Lucene Query Nodes</h2>
<p>
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.
</p>
</body>
</html>

View File

@ -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
*
* <h2>Lucene Flexible Query Parser Implementation</h2>
* <p>
* 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.
* <p>
* The classes contained in the package org.apache.lucene.queryParser.standard
* are used to reproduce the same behavior as the old query parser.
*
* <p>
* Check {@link org.apache.lucene.queryparser.flexible.standard.StandardQueryParser} to quick start using the Lucene query parser.
*/
package org.apache.lucene.queryparser.flexible.standard;

View File

@ -1,43 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Implementation of the {@linkplain org.apache.lucene.queryparser.classic Lucene classic query parser} using the flexible query parser frameworks
<h2>Lucene Flexible Query Parser Implementation</h2>
<p>
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.
</p>
<p>
The classes contained in the package org.apache.lucene.queryParser.standard
are used to reproduce the same behavior as the old query parser.
</p>
<p>
Check {@link org.apache.lucene.queryparser.flexible.standard.StandardQueryParser} to quick start using the Lucene query parser.
</p>
</body>
</html>

View File

@ -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.
*/
/**
* <h2>Lucene Query Parser</h2>
* <p>
* The package org.apache.lucene.queryparser.flexible.standard.parser contains the query parser.
* <p>
* 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;

View File

@ -1,35 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Lucene Query Parser.
<h2>Lucene Query Parser</h2>
<p>
The package org.apache.lucene.queryparser.flexible.standard.parser contains the query parser.
</p>
<p>
This text parser only performs the syntax validation and creates an QueryNode tree
from a query string.
</p>
</body>
</html>

View File

@ -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.
*
* <h2>Lucene Query Node Processors</h2>
* <p>
* 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.
* <p>
* These processors are already assembled correctly in the StandardQueryNodeProcessorPipeline.
*/
package org.apache.lucene.queryparser.flexible.standard.processors;

View File

@ -1,35 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Lucene Query Node Processors.
<h2>Lucene Query Node Processors</h2>
<p>
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.
</p>
<p>
These processors are already assembled correctly in the StandardQueryNodeProcessorPipeline.
</p>
</body>
</html>

View File

@ -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;

View File

@ -1,22 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<body>
A simple query parser for human-entered queries.
</body>
</html>

View File

@ -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.
* <p>
* 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;

View File

@ -1,28 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<title>Surround parser package</title>
</head>
<body>
This package contains the QueryParser.jj source file for the Surround parser.
<p/>
Parsing the text of a query results in a SrndQuery in the
org.apache.lucene.queryparser.surround.query package.
</body>
</html>

View File

@ -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.
*/
/**
* This package contains SrndQuery and its subclasses.
* <p>
* The parser in the org.apache.lucene.queryparser.surround.parser package
* normally generates a SrndQuery.
* <p>
* 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;

View File

@ -1,32 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<head>
<title>Surround query package</title>
</head>
<body>
This package contains SrndQuery and its subclasses.
<p/>
The parser in the org.apache.lucene.queryparser.surround.parser package
normally generates a SrndQuery.
<p/>
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.
</body>
</html>

View File

@ -0,0 +1,22 @@
/*
* 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.
*/
/**
* XML Parser factories for different Lucene Query/Filters.
*/
package org.apache.lucene.queryparser.xml.builders;

View File

@ -1,22 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<body>
XML Parser factories for different Lucene Query/Filters.
</body>
</html>

View File

@ -0,0 +1,22 @@
/*
* 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.
*/
/**
* Parser that produces Lucene Query objects from XML streams.
*/
package org.apache.lucene.queryparser.xml;

View File

@ -1,22 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
-->
<html>
<body>
Parser that produces Lucene Query objects from XML streams.
</body>
</html>