lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/search PhrasePrefixQuery.java
Date Fri, 17 Sep 2004 19:21:14 GMT
dnaber      2004/09/17 12:21:14

  Modified:    src/java/org/apache/lucene/search PhrasePrefixQuery.java
  Log:
  fix toString output; make the comments real javadoc comments
  
  Revision  Changes    Path
  1.16      +7 -5      jakarta-lucene/src/java/org/apache/lucene/search/PhrasePrefixQuery.java
  
  Index: PhrasePrefixQuery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/PhrasePrefixQuery.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- PhrasePrefixQuery.java	15 Sep 2004 21:09:00 -0000	1.15
  +++ PhrasePrefixQuery.java	17 Sep 2004 19:21:14 -0000	1.16
  @@ -45,22 +45,22 @@
   
     private int slop = 0;
   
  -  /* Sets the phrase slop for this query.
  +  /** Sets the phrase slop for this query.
      * @see PhraseQuery#setSlop(int)
      */
     public void setSlop(int s) { slop = s; }
   
  -  /* Sets the phrase slop for this query.
  +  /** Sets the phrase slop for this query.
      * @see PhraseQuery#getSlop()
      */
     public int getSlop() { return slop; }
   
  -  /* Add a single term at the next position in the phrase.
  +  /** Add a single term at the next position in the phrase.
      * @see PhraseQuery#add(Term)
      */
     public void add(Term term) { add(new Term[]{term}); }
   
  -  /* Add multiple terms at the next position in the phrase.  Any of the terms
  +  /** Add multiple terms at the next position in the phrase.  Any of the terms
      * may match.
      *
      * @see PhraseQuery#add(Term)
  @@ -250,7 +250,9 @@
       Iterator i = termArrays.iterator();
       while (i.hasNext()) {
         Term[] terms = (Term[])i.next();
  -      buffer.append(terms[0].text() + (terms.length > 0 ? "*" : ""));
  +      buffer.append(terms[0].text() + (terms.length > 1 ? "*" : ""));
  +      if (i.hasNext())
  +        buffer.append(" ");
       }
       buffer.append("\"");
   
  
  
  

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