Index: CHANGES.txt =================================================================== --- CHANGES.txt (revision 803660) +++ CHANGES.txt (working copy) @@ -365,12 +365,7 @@ 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 @@ -649,23 +644,16 @@ 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) Index: src/java/org/apache/lucene/queryParser/QueryParserConstants.java =================================================================== --- src/java/org/apache/lucene/queryParser/QueryParserConstants.java (revision 803660) +++ src/java/org/apache/lucene/queryParser/QueryParserConstants.java (working copy) @@ -5,10 +5,6 @@ /** * Token literal values and constants. * Generated by org.javacc.parser.OtherFilesGen#start() - * - * @deprecated use the equivalent class defined in the new queryparser project, - * currently located in contrib: org.apache.lucene.queryParser.original.parser.TextParserConstants - * */ public interface QueryParserConstants { Index: src/java/org/apache/lucene/queryParser/Token.java =================================================================== --- src/java/org/apache/lucene/queryParser/Token.java (revision 803660) +++ src/java/org/apache/lucene/queryParser/Token.java (working copy) @@ -4,10 +4,6 @@ /** * Describes the input token stream. - * - * @deprecated use the equivalent class defined in the new queryparser project, - * currently located in contrib: org.apache.lucene.queryParser.original.parser.Token - * */ public class Token { Index: src/java/org/apache/lucene/queryParser/TokenMgrError.java =================================================================== --- src/java/org/apache/lucene/queryParser/TokenMgrError.java (revision 803660) +++ src/java/org/apache/lucene/queryParser/TokenMgrError.java (working copy) @@ -2,12 +2,7 @@ /* JavaCCOptions: */ package org.apache.lucene.queryParser; -/** Token Manager Error. - * - * @deprecated use the equivalent class defined in the new queryparser project, - * currently located in contrib: org.apache.lucene.queryParser.original.parser.TokenMgrError - * - */ +/** Token Manager Error. */ public class TokenMgrError extends Error { Index: src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java =================================================================== --- src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java (revision 803660) +++ src/java/org/apache/lucene/queryParser/MultiFieldQueryParser.java (working copy) @@ -31,9 +31,6 @@ /** * A QueryParser which constructs queries to search multiple fields. * - * @deprecated use the equivalent class defined in the new queryparser project, - * currently located in contrib: org.apache.lucene.queryParser.original.OriginalQueryParserHelper - * * @version $Revision$ */ public class MultiFieldQueryParser extends QueryParser Index: src/java/org/apache/lucene/queryParser/QueryParser.java =================================================================== --- src/java/org/apache/lucene/queryParser/QueryParser.java (revision 803660) +++ src/java/org/apache/lucene/queryParser/QueryParser.java (working copy) @@ -96,10 +96,11 @@ * use a different method for date conversion. *

* - *

Note that QueryParser is not thread-safe.

+ *

Note that QueryParser is not thread-safe.

* - * @deprecated use the equivalent class defined in the new queryparser project, - * currently located in contrib: org.apache.lucene.queryParser.original.OriginalQueryParserHelper + *

NOTE: 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 { @@ -1584,6 +1585,16 @@ 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; @@ -1596,16 +1607,6 @@ 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. */ Index: src/java/org/apache/lucene/queryParser/QueryParser.jj =================================================================== --- src/java/org/apache/lucene/queryParser/QueryParser.jj (revision 803660) +++ src/java/org/apache/lucene/queryParser/QueryParser.jj (working copy) @@ -121,10 +121,10 @@ *

* *

Note that QueryParser is not thread-safe.

- * - * @deprecated use the equivalent class defined in the new queryparser project, - * currently located in contrib: org.apache.lucene.queryParser.original.LuceneQueryParserHelper - * + * + *

NOTE: 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 { Index: src/java/org/apache/lucene/queryParser/FastCharStream.java =================================================================== --- src/java/org/apache/lucene/queryParser/FastCharStream.java (revision 803660) +++ src/java/org/apache/lucene/queryParser/FastCharStream.java (working copy) @@ -25,9 +25,6 @@ * 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; Index: src/java/org/apache/lucene/queryParser/CharStream.java =================================================================== --- src/java/org/apache/lucene/queryParser/CharStream.java (revision 803660) +++ src/java/org/apache/lucene/queryParser/CharStream.java (working copy) @@ -15,8 +15,6 @@ * 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 { Index: src/java/org/apache/lucene/queryParser/ParseException.java =================================================================== --- src/java/org/apache/lucene/queryParser/ParseException.java (revision 803660) +++ src/java/org/apache/lucene/queryParser/ParseException.java (working copy) @@ -10,9 +10,6 @@ * * 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 queryparser project, - * currently located in contrib: org.apache.lucene.queryParser.original.parser.ParseException */ public class ParseException extends Exception { Index: src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java =================================================================== --- src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java (revision 803660) +++ src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java (working copy) @@ -34,11 +34,7 @@ import org.apache.lucene.search.WildcardQuery; import org.apache.lucene.util.Parameter; -/** Token Manager. - * - * @deprecated use the equivalent class defined in the new queryparser project, - * currently located in contrib: org.apache.lucene.queryParser.original.parser.TextParserTokenManager - */ +/** Token Manager. */ public class QueryParserTokenManager implements QueryParserConstants { Index: src/java/org/apache/lucene/queryParser/package.html =================================================================== --- src/java/org/apache/lucene/queryParser/package.html (revision 803660) +++ src/java/org/apache/lucene/queryParser/package.html (working copy) @@ -20,7 +20,6 @@ -NOTE: Please look into lucene contrib/queryparser for the new flexible queryparser api. A simple query parser implemented with JavaCC.

Note that JavaCC defines lots of public classes, methods and fields @@ -28,5 +27,9 @@ Sorry.

Note that because JavaCC defines a class named Token, org.apache.lucene.analysis.Token must always be fully qualified in source code in this package. + +

NOTE: 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. + Index: contrib/queryparser/src/java/overview.html =================================================================== --- contrib/queryparser/src/java/overview.html (revision 803660) +++ contrib/queryparser/src/java/overview.html (working copy) @@ -23,7 +23,7 @@

Apache Lucene Flexible Query Parser

-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.