You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by dn...@apache.org on 2004/11/08 01:10:39 UTC

cvs commit: jakarta-lucene/src/java/org/apache/lucene/search FuzzyQuery.java

dnaber      2004/11/07 16:10:39

  Modified:    src/java/org/apache/lucene/search FuzzyQuery.java
  Log:
  fix javadoc
  
  Revision  Changes    Path
  1.11      +4 -4      jakarta-lucene/src/java/org/apache/lucene/search/FuzzyQuery.java
  
  Index: FuzzyQuery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/FuzzyQuery.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FuzzyQuery.java	12 Oct 2004 09:42:02 -0000	1.10
  +++ FuzzyQuery.java	8 Nov 2004 00:10:39 -0000	1.11
  @@ -46,8 +46,8 @@
      *  as the query term is considered similar to the query term if the edit distance
      *  between both terms is less than <code>length(term)*0.5</code>
      * @param prefixLength length of common (non-fuzzy) prefix
  -   * @throws IllegalArgumentException if minimumSimilarity is &gt; 1 or &lt; 0
  -   * or if prefixLength &lt; 0 or &gt; <code>term.text().length()</code>.
  +   * @throws IllegalArgumentException if minimumSimilarity is &gt;= 1 or &lt; 0
  +   * or if prefixLength &lt; 0
      */
     public FuzzyQuery(Term term, float minimumSimilarity, int prefixLength) throws IllegalArgumentException {
       super(term);
  @@ -56,10 +56,10 @@
         throw new IllegalArgumentException("minimumSimilarity >= 1");
       else if (minimumSimilarity < 0.0f)
         throw new IllegalArgumentException("minimumSimilarity < 0");
  +    if (prefixLength < 0)
  +      throw new IllegalArgumentException("prefixLength < 0");
       
       this.minimumSimilarity = minimumSimilarity;
  -    if(prefixLength < 0)
  -        throw new IllegalArgumentException("prefixLength < 0");
       this.prefixLength = prefixLength;
     }
     
  
  
  

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