LUCENE-1802: undeprecate current QueryParser

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@804016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-08-13 20:08:58 +00:00
parent 1eb8149fb3
commit e166d54f87
13 changed files with 29 additions and 65 deletions

View File

@ -367,12 +367,7 @@ API Changes
34. LUCENE-1460: Changed TokenStreams/TokenFilters in contrib to
use the new TokenStream API. (Robert Muir, Michael Busch)
35. LUCENE-1567: Deprecated Queryparser, which will be replaced by a
new QueryParser framework in Lucene 3.0, that is currently located
in contrib. (see New Features 35.)
(Luis Alves and Adriano Campos via Michael Busch)
36. LUCENE-1748: LUCENE-1001 introduced PayloadSpans, but this was a back
35. LUCENE-1748: LUCENE-1001 introduced PayloadSpans, but this was a back
compat break and caused custom SpanQuery implementations to fail at runtime
in a variety of ways. This issue attempts to remedy things by causing
a compile time break on custom SpanQuery implementations and removing
@ -657,23 +652,16 @@ New features
multiple fields with the same name are added to a document.
(Mike McCandless, Mark Miller, Michael Busch)
32. LUCENE-1567: Added a new QueryParser framework to contrib, that
allows implementing a new query syntax in a flexible and efficient
way. This new QueryParser will be moved to Lucene's core in release
3.0 and will then replace the current core QueryParser, which
has been deprecated with this patch.
(Luis Alves and Adriano Campos via Michael Busch)
33. LUCENE-1776: Add an option to not collect payloads for an ordered
32. LUCENE-1776: Add an option to not collect payloads for an ordered
SpanNearQuery. Payloads were not lazily loaded in this case as
the javadocs implied. If you have payloads and want to use an ordered
SpanNearQuery that does not need to use the payloads, you can
disable loading them with a new constructor switch. (Mark Miller)
34. LUCENE-1341: Added BoostingNearQuery to enable SpanNearQuery functionality
33. LUCENE-1341: Added BoostingNearQuery to enable SpanNearQuery functionality
with payloads (Peter Keegan, Grant Ingersoll)
35. LUCENE-1790: Added BoostingFunctionTermQuery to enable scoring of payloads
34. LUCENE-1790: Added BoostingFunctionTermQuery to enable scoring of payloads
based on the maximum payload seen for a document.
Slight refactoring of Similarity and other payload queries (Grant Ingersoll)

View File

@ -23,7 +23,7 @@
<h2>Apache Lucene Flexible Query Parser</h2>
<p>
This contrib project contains the new Lucene query parser implementation, which is going to replace the old query parser on Lucene 3.0.
This contrib project contains the new Lucene query parser implementation, which matches the syntax of the core QueryParser but offers a more modular architecture to enable customization.
</p>
<p>

View File

@ -15,8 +15,6 @@ package org.apache.lucene.queryParser;
* column number and the String that constitutes a token and are not used
* by the lexer. Hence their implementation won't affect the generated lexer's
* operation.
*
* @deprecated this class will be removed in Lucene 3.0, when the {@link QueryParser} is removed
*/
public interface CharStream {

View File

@ -25,9 +25,6 @@ import java.io.*;
* this does not do line-number counting, but instead keeps track of the
* character position of the token in the input, as required by Lucene's {@link
* org.apache.lucene.analysis.Token} API.
*
* @deprecated this class will be removed in Lucene 3.0, when the {@link QueryParser} is removed
*
* */
public final class FastCharStream implements CharStream {
char[] buffer = null;

View File

@ -31,9 +31,6 @@ import org.apache.lucene.search.Query;
/**
* A QueryParser which constructs queries to search multiple fields.
*
* @deprecated use the equivalent class defined in the new <tt>queryparser</tt> project,
* currently located in contrib: org.apache.lucene.queryParser.original.OriginalQueryParserHelper
*
* @version $Revision$
*/
public class MultiFieldQueryParser extends QueryParser

View File

@ -10,9 +10,6 @@ package org.apache.lucene.queryParser;
*
* You can modify this class to customize your error reporting
* mechanisms so long as you retain the public fields.
*
* @deprecated use the equivalent class defined in the new <tt>queryparser</tt> project,
* currently located in contrib: org.apache.lucene.queryParser.original.parser.ParseException
*/
public class ParseException extends Exception {

View File

@ -98,8 +98,9 @@ import org.apache.lucene.util.Parameter;
*
* <p>Note that QueryParser is <em>not</em> thread-safe.</p>
*
* @deprecated use the equivalent class defined in the new <tt>queryparser</tt> project,
* currently located in contrib: org.apache.lucene.queryParser.original.OriginalQueryParserHelper
* <p><b>NOTE</b>: there is a new QueryParser in contrib, which matches
* the same syntax as this class, but is more modular,
* enabling substantial customization to how a query is created.
*/
public class QueryParser implements QueryParserConstants {
@ -1590,6 +1591,16 @@ public class QueryParser implements QueryParserConstants {
finally { jj_save(0, xla); }
}
private boolean jj_3_1() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_2()) {
jj_scanpos = xsp;
if (jj_3R_3()) return true;
}
return false;
}
private boolean jj_3R_3() {
if (jj_scan_token(STAR)) return true;
if (jj_scan_token(COLON)) return true;
@ -1602,16 +1613,6 @@ public class QueryParser implements QueryParserConstants {
return false;
}
private boolean jj_3_1() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_2()) {
jj_scanpos = xsp;
if (jj_3R_3()) return true;
}
return false;
}
/** Generated Token Manager. */
public QueryParserTokenManager token_source;
/** Current token. */

View File

@ -122,9 +122,9 @@ import org.apache.lucene.util.Parameter;
*
* <p>Note that QueryParser is <em>not</em> thread-safe.</p>
*
* @deprecated use the equivalent class defined in the new <tt>queryparser</tt> project,
* currently located in contrib: org.apache.lucene.queryParser.original.LuceneQueryParserHelper
*
* <p><b>NOTE</b>: there is a new QueryParser in contrib, which matches
* the same syntax as this class, but is more modular,
* enabling substantial customization to how a query is created.
*/
public class QueryParser {

View File

@ -5,10 +5,6 @@ package org.apache.lucene.queryParser;
/**
* Token literal values and constants.
* Generated by org.javacc.parser.OtherFilesGen#start()
*
* @deprecated use the equivalent class defined in the new <tt>queryparser</tt> project,
* currently located in contrib: org.apache.lucene.queryParser.original.parser.TextParserConstants
*
*/
public interface QueryParserConstants {

View File

@ -34,11 +34,7 @@ import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.WildcardQuery;
import org.apache.lucene.util.Parameter;
/** Token Manager.
*
* @deprecated use the equivalent class defined in the new <tt>queryparser</tt> project,
* currently located in contrib: org.apache.lucene.queryParser.original.parser.TextParserTokenManager
*/
/** Token Manager. */
public class QueryParserTokenManager implements QueryParserConstants
{

View File

@ -4,10 +4,6 @@ package org.apache.lucene.queryParser;
/**
* Describes the input token stream.
*
* @deprecated use the equivalent class defined in the new <tt>queryparser</tt> project,
* currently located in contrib: org.apache.lucene.queryParser.original.parser.Token
*
*/
public class Token {

View File

@ -2,12 +2,7 @@
/* JavaCCOptions: */
package org.apache.lucene.queryParser;
/** Token Manager Error.
*
* @deprecated use the equivalent class defined in the new <tt>queryparser</tt> project,
* currently located in contrib: org.apache.lucene.queryParser.original.parser.TokenMgrError
*
*/
/** Token Manager Error. */
public class TokenMgrError extends Error
{

View File

@ -20,7 +20,6 @@
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
NOTE: Please look into lucene contrib/queryparser for the new flexible queryparser api.
A simple query parser implemented with JavaCC.
<p>Note that JavaCC defines lots of public classes, methods and fields
@ -28,5 +27,9 @@ 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>: contrib/queryparser has an alternative queryparser that matches the syntax of this one, but is more modular,
enabling substantial customization to how a query is created.
</body>
</html>