lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gol...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/queryParser QueryParser.java QueryParser.jj
Date Tue, 12 Oct 2004 09:01:50 GMT
goller      2004/10/12 02:01:50

  Modified:    src/java/org/apache/lucene/queryParser Tag: lucene_1_4_2_dev
                        QueryParser.java QueryParser.jj
  Log:
  deprecated property for "old" getFieldQuery,
  getRangeQuery, and getFuzzyQuery substituted by
  proper comment. Will become deprecated in Version 1.9
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.11.2.3  +34 -9     jakarta-lucene/src/java/org/apache/lucene/queryParser/QueryParser.java
  
  Index: QueryParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/queryParser/QueryParser.java,v
  retrieving revision 1.11.2.2
  retrieving revision 1.11.2.3
  diff -u -r1.11.2.2 -r1.11.2.3
  --- QueryParser.java	11 Oct 2004 13:36:14 -0000	1.11.2.2
  +++ QueryParser.java	12 Oct 2004 09:01:50 -0000	1.11.2.3
  @@ -244,8 +244,12 @@
     }
   
     /**
  -   * Parameter analyzer is ignored.
  -   * @deprecated use {@link #getFieldQuery(String, String)}
  +   * Note that parameter analyzer is ignored. Calls inside the parser always
  +   * use class member analyser. This method will be deprecated and substituted
  +   * by {@link #getFieldQuery(String, String)} in future versions of Lucene.
  +   * Currently overwriting either of these methods works.
  +   *
  +   * @exception ParseException throw in overridden method to disallow
      */
     protected Query getFieldQuery(String field,
                                                       Analyzer analyzer,
  @@ -298,8 +302,16 @@
     }
   
     /**
  -   * Parameter analyzer is ignored.
  -   * @deprecated use {@link #getFieldQuery(String, String, int)}
  +   * Base implementation delegates to {@link #getFieldQuery(String, Analyzer, String)}.
  +   * This method may be overwritten, for example, to return
  +   * a SpanNearQuery instead of a PhraseQuery.
  +   *  
  +   * Note that parameter analyzer is ignored. Calls inside the parser always
  +   * use class member analyser. This method will be deprecated and substituted
  +   * by {@link #getFieldQuery(String, String, int)} in future versions of Lucene.
  +   * Currently overwriting either of these methods works.
  +   *
  +   *  @exception ParseException throw in overridden method to disallow
      */
     protected Query getFieldQuery(String field,
                                                       Analyzer analyzer,
  @@ -327,8 +339,12 @@
     }
   
     /**
  -   * Parameter analyzer is ignored.
  -   * @deprecated use {@link #getRangeQuery(String, String, String, boolean)}
  +   * Note that parameter analyzer is ignored. Calls inside the parser always
  +   * use class member analyser. This method will be deprecated and substituted
  +   * by {@link #getRangeQuery(String, String, String, boolean)} in future versions of Lucene.
  +   * Currently overwriting either of these methods works.
  +   *
  +   * @exception ParseException throw in overridden method to disallow
      */
     protected Query getRangeQuery(String field,
         Analyzer analyzer,
  @@ -445,8 +461,16 @@
       return new PrefixQuery(t);
     }
   
  - /**
  -   * @deprecated use {@link #getFuzzyQuery(String, String, float)}
  +  /**
  +   * Factory method for generating a query (similar to
  +   * ({@link #getWildcardQuery}). Called when parser parses
  +   * an input term token that has the fuzzy suffix (~) appended.
  +   *
  +   * @param field Name of the field query will use.
  +   * @param termStr Term token to use for building term for the query
  +   *
  +   * @return Resulting {@link Query} built for the term
  +   * @exception ParseException throw in overridden method to disallow
      */
     protected Query getFuzzyQuery(String field, String termStr) throws ParseException {
       return getFuzzyQuery(field, termStr, fuzzyMinSim);
  @@ -455,10 +479,11 @@
     /**
      * Factory method for generating a query (similar to
      * ({@link #getWildcardQuery}). Called when parser parses
  -   * an input term token that has the fuzzy suffix (~) appended.
  +   * an input term token that has the fuzzy suffix (~floatNumber) appended.
      *
      * @param field Name of the field query will use.
      * @param termStr Term token to use for building term for the query
  +   * @param minSimilarity the minimum similarity required for a fuzzy match
      *
      * @return Resulting {@link Query} built for the term
      * @exception ParseException throw in overridden method to disallow
  
  
  
  1.43.2.3  +34 -9     jakarta-lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj
  
  Index: QueryParser.jj
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj,v
  retrieving revision 1.43.2.2
  retrieving revision 1.43.2.3
  diff -u -r1.43.2.2 -r1.43.2.3
  --- QueryParser.jj	11 Oct 2004 13:36:14 -0000	1.43.2.2
  +++ QueryParser.jj	12 Oct 2004 09:01:50 -0000	1.43.2.3
  @@ -267,8 +267,12 @@
     }
     
     /**
  -   * Parameter analyzer is ignored.
  -   * @deprecated use {@link #getFieldQuery(String, String)}
  +   * Note that parameter analyzer is ignored. Calls inside the parser always
  +   * use class member analyser. This method will be deprecated and substituted
  +   * by {@link #getFieldQuery(String, String)} in future versions of Lucene.
  +   * Currently overwriting either of these methods works.
  +   *
  +   * @exception ParseException throw in overridden method to disallow
      */
     protected Query getFieldQuery(String field, 
                                                       Analyzer analyzer, 
  @@ -321,8 +325,16 @@
     }
     
     /**
  -   * Parameter analyzer is ignored.
  -   * @deprecated use {@link #getFieldQuery(String, String, int)}
  +   * Base implementation delegates to {@link #getFieldQuery(String, Analyzer, String)}.
  +   * This method may be overwritten, for example, to return
  +   * a SpanNearQuery instead of a PhraseQuery.
  +   *  
  +   * Note that parameter analyzer is ignored. Calls inside the parser always
  +   * use class member analyser. This method will be deprecated and substituted
  +   * by {@link #getFieldQuery(String, String, int)} in future versions of Lucene.
  +   * Currently overwriting either of these methods works.
  +   *
  +   *  @exception ParseException throw in overridden method to disallow
      */
     protected Query getFieldQuery(String field, 
                                                       Analyzer analyzer, 
  @@ -350,8 +362,12 @@
     }
     
     /**
  -   * Parameter analyzer is ignored.
  -   * @deprecated use {@link #getRangeQuery(String, String, String, boolean)}
  +   * Note that parameter analyzer is ignored. Calls inside the parser always
  +   * use class member analyser. This method will be deprecated and substituted
  +   * by {@link #getRangeQuery(String, String, String, boolean)} in future versions of Lucene.
  +   * Currently overwriting either of these methods works.
  +   *
  +   * @exception ParseException throw in overridden method to disallow
      */
     protected Query getRangeQuery(String field,
         Analyzer analyzer,
  @@ -468,8 +484,16 @@
       return new PrefixQuery(t);
     }
   
  - /**
  -   * @deprecated use {@link #getFuzzyQuery(String, String, float)}
  +  /**
  +   * Factory method for generating a query (similar to
  +   * ({@link #getWildcardQuery}). Called when parser parses
  +   * an input term token that has the fuzzy suffix (~) appended.
  +   *
  +   * @param field Name of the field query will use.
  +   * @param termStr Term token to use for building term for the query
  +   *
  +   * @return Resulting {@link Query} built for the term
  +   * @exception ParseException throw in overridden method to disallow
      */
     protected Query getFuzzyQuery(String field, String termStr) throws ParseException {
       return getFuzzyQuery(field, termStr, fuzzyMinSim);
  @@ -478,10 +502,11 @@
     /**
      * Factory method for generating a query (similar to
      * ({@link #getWildcardQuery}). Called when parser parses
  -   * an input term token that has the fuzzy suffix (~) appended.
  +   * an input term token that has the fuzzy suffix (~floatNumber) appended.
      *
      * @param field Name of the field query will use.
      * @param termStr Term token to use for building term for the query
  +   * @param minSimilarity the minimum similarity required for a fuzzy match
      *
      * @return Resulting {@link Query} built for the term
      * @exception ParseException throw in overridden method to disallow
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message