You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2013/02/22 00:55:09 UTC

svn commit: r1448859 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/analysis/ lucene/analysis/common/src/java/org/apache/lucene/analysis/sinks/ lucene/core/ lucene/core/src/java/org/apache/lucene/document/ lucene/queries/ lucene/queries/src/jav...

Author: jpountz
Date: Thu Feb 21 23:55:09 2013
New Revision: 1448859

URL: http://svn.apache.org/r1448859
Log:
LUCENE-4784, LUCENE-4785, LUCENE-4786: Fixed references to deprecated classes SinkTokenizer, ValueSourceQuery and RangeQuery (merged from r1448852).

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_4x/lucene/analysis/   (props changed)
    lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/sinks/package.html
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/document/DateTools.java
    lucene/dev/branches/branch_4x/lucene/queries/   (props changed)
    lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreProvider.java
    lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
    lucene/dev/branches/branch_4x/lucene/queryparser/   (props changed)
    lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java

Modified: lucene/dev/branches/branch_4x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/CHANGES.txt?rev=1448859&r1=1448858&r2=1448859&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/lucene/CHANGES.txt Thu Feb 21 23:55:09 2013
@@ -232,6 +232,9 @@ Documentation
 * LUCENE-4718: Fixed documentation of oal.queryparser.classic.
   (Hayden Muhl via Adrien Grand)
 
+* LUCENE-4784, LUCENE-4785, LUCENE-4786: Fixed references to deprecated classes
+  SinkTokenizer, ValueSourceQuery and RangeQuery. (Hao Zhong via Adrien Grand) 
+
 Build
 
 * LUCENE-4636: Upgrade ivy to 2.3.0 (Shawn Heisey via Robert Muir)

Modified: lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/sinks/package.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/sinks/package.html?rev=1448859&r1=1448858&r2=1448859&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/sinks/package.html (original)
+++ lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/sinks/package.html Thu Feb 21 23:55:09 2013
@@ -20,6 +20,8 @@
    <TITLE>org.apache.lucene.analysis.sinks</TITLE>
 </HEAD>
 <BODY>
-Implementations of the SinkTokenizer that might be useful.
+{@link org.apache.lucene.analysis.sinks.TeeSinkTokenFilter} and implementations
+of {@link org.apache.lucene.analysis.sinks.TeeSinkTokenFilter.SinkFilter} that
+might be useful.
 </BODY>
 </HTML>
\ No newline at end of file

Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/document/DateTools.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/document/DateTools.java?rev=1448859&r1=1448858&r2=1448859&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/document/DateTools.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/document/DateTools.java Thu Feb 21 23:55:09 2013
@@ -18,6 +18,8 @@ package org.apache.lucene.document;
  */
 
 import org.apache.lucene.search.NumericRangeQuery; // for javadocs
+import org.apache.lucene.search.PrefixQuery;
+import org.apache.lucene.search.TermRangeQuery;
 import org.apache.lucene.util.NumericUtils;        // for javadocs
 
 import java.text.ParseException;
@@ -35,7 +37,7 @@ import java.util.TimeZone;
  * 
  * <P>This class also helps you to limit the resolution of your dates. Do not
  * save dates with a finer resolution than you really need, as then
- * RangeQuery and PrefixQuery will require more memory and become slower.
+ * {@link TermRangeQuery} and {@link PrefixQuery} will require more memory and become slower.
  * 
  * <P>
  * Another approach is {@link NumericUtils}, which provides

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreProvider.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreProvider.java?rev=1448859&r1=1448858&r2=1448859&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreProvider.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreProvider.java Thu Feb 21 23:55:09 2013
@@ -21,6 +21,7 @@ import java.io.IOException;
 
 import org.apache.lucene.index.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader; // for javadocs
+import org.apache.lucene.queries.function.FunctionQuery;
 import org.apache.lucene.search.Explanation;
 import org.apache.lucene.search.FieldCache; // for javadocs
 
@@ -55,7 +56,7 @@ public class CustomScoreProvider {
    * <p>
    * If your custom scoring is different than the default herein you 
    * should override at least one of the two customScore() methods.
-   * If the number of ValueSourceQueries is always &lt; 2 it is 
+   * If the number of {@link FunctionQuery function queries} is always &lt; 2 it is 
    * sufficient to override the other 
    * {@link #customScore(int, float, float) customScore()} 
    * method, which is simpler. 
@@ -67,7 +68,7 @@ public class CustomScoreProvider {
    * 
    * @param doc id of scored doc. 
    * @param subQueryScore score of that doc by the subQuery.
-   * @param valSrcScores scores of that doc by the ValueSourceQuery.
+   * @param valSrcScores scores of that doc by the {@link FunctionQuery}.
    * @return custom score.
    */
   public float customScore(int doc, float subQueryScore, float valSrcScores[]) throws IOException {
@@ -85,13 +86,13 @@ public class CustomScoreProvider {
   }
 
   /**
-   * Compute a custom score by the subQuery score and the ValueSourceQuery score.
+   * Compute a custom score by the subQuery score and the {@link FunctionQuery} score.
    * <p> 
    * Subclasses can override this method to modify the custom score.
    * <p>
    * If your custom scoring is different than the default herein you 
    * should override at least one of the two customScore() methods.
-   * If the number of ValueSourceQueries is always &lt; 2 it is 
+   * If the number of {@link FunctionQuery function queries} is always &lt; 2 it is 
    * sufficient to override this customScore() method, which is simpler. 
    * <p>
    * The default computation herein is a multiplication of the two scores:
@@ -101,7 +102,7 @@ public class CustomScoreProvider {
    *
    * @param doc id of scored doc. 
    * @param subQueryScore score of that doc by the subQuery.
-   * @param valSrcScore score of that doc by the ValueSourceQuery.
+   * @param valSrcScore score of that doc by the {@link FunctionQuery}.
    * @return custom score.
    */
   public float customScore(int doc, float subQueryScore, float valSrcScore) throws IOException {

Modified: lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java?rev=1448859&r1=1448858&r2=1448859&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java Thu Feb 21 23:55:09 2013
@@ -26,6 +26,8 @@ import java.util.Arrays;
 import org.apache.lucene.index.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
+import org.apache.lucene.queries.function.FunctionQuery;
+import org.apache.lucene.queries.function.ValueSource;
 import org.apache.lucene.search.ComplexExplanation;
 import org.apache.lucene.search.Explanation;
 import org.apache.lucene.search.Query;
@@ -39,7 +41,7 @@ import org.apache.lucene.util.ToStringUt
  * Query that sets document score as a programmatic function of several (sub) scores:
  * <ol>
  *    <li>the score of its subQuery (any query)</li>
- *    <li>(optional) the score of its ValueSourceQuery (or queries).</li>
+ *    <li>(optional) the score of its {@link FunctionQuery} (or queries).</li>
  * </ol>
  * Subclasses can modify the computation by overriding {@link #getCustomScoreProvider}.
  * 
@@ -355,12 +357,12 @@ public class CustomScoreQuery extends Qu
 
   /**
    * Checks if this is strict custom scoring.
-   * In strict custom scoring, the ValueSource part does not participate in weight normalization.
+   * In strict custom scoring, the {@link ValueSource} part does not participate in weight normalization.
    * This may be useful when one wants full control over how scores are modified, and does 
-   * not care about normalizing by the ValueSource part.
+   * not care about normalizing by the {@link ValueSource} part.
    * One particular case where this is useful if for testing this query.   
    * <P>
-   * Note: only has effect when the ValueSource part is not null.
+   * Note: only has effect when the {@link ValueSource} part is not null.
    */
   public boolean isStrict() {
     return strict;

Modified: lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java?rev=1448859&r1=1448858&r2=1448859&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java (original)
+++ lucene/dev/branches/branch_4x/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java Thu Feb 21 23:55:09 2013
@@ -32,6 +32,7 @@ import org.apache.lucene.index.Term;
 import org.apache.lucene.queryparser.classic.QueryParser.Operator;
 import org.apache.lucene.queryparser.flexible.standard.CommonQueryParserConfiguration;
 import org.apache.lucene.search.*;
+import org.apache.lucene.search.BooleanQuery.TooManyClauses;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.Version;
 
@@ -314,11 +315,11 @@ public abstract class QueryParserBase im
 
   /**
    * By default QueryParser uses {@link org.apache.lucene.search.MultiTermQuery#CONSTANT_SCORE_AUTO_REWRITE_DEFAULT}
-   * when creating a PrefixQuery, WildcardQuery or RangeQuery. This implementation is generally preferable because it
+   * when creating a {@link PrefixQuery}, {@link WildcardQuery} or {@link TermRangeQuery}. This implementation is generally preferable because it
    * a) Runs faster b) Does not have the scarcity of terms unduly influence score
-   * c) avoids any "TooManyBooleanClauses" exception.
+   * c) avoids any {@link TooManyClauses} exception.
    * However, if your application really needs to use the
-   * old-fashioned BooleanQuery expansion rewriting and the above
+   * old-fashioned {@link BooleanQuery} expansion rewriting and the above
    * points are not relevant then use this to change
    * the rewrite method.
    */
@@ -420,9 +421,9 @@ public abstract class QueryParserBase im
   }
 
   /**
-   * Set whether or not to analyze range terms when constructing RangeQuerys.
+   * Set whether or not to analyze range terms when constructing {@link TermRangeQuery}s.
    * For example, setting this to true can enable analyzing terms into 
-   * collation keys for locale-sensitive RangeQuery.
+   * collation keys for locale-sensitive {@link TermRangeQuery}.
    * 
    * @param analyzeRangeTerms whether or not terms should be analyzed for RangeQuerys
    */
@@ -431,7 +432,7 @@ public abstract class QueryParserBase im
   }
 
   /**
-   * @return whether or not to analyze range terms when constructing RangeQuerys.
+   * @return whether or not to analyze range terms when constructing {@link TermRangeQuery}s.
    */
   public boolean getAnalyzeRangeTerms() {
     return analyzeRangeTerms;
@@ -848,13 +849,13 @@ public abstract class QueryParserBase im
   }
 
   /**
-   * Builds a new TermRangeQuery instance
+   * Builds a new {@link TermRangeQuery} instance
    * @param field Field
    * @param part1 min
    * @param part2 max
    * @param startInclusive true if the start of the range is inclusive
    * @param endInclusive true if the end of the range is inclusive
-   * @return new TermRangeQuery instance
+   * @return new {@link TermRangeQuery} instance
    */
   protected Query newRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) {
     final BytesRef start;