lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/search PrefixQuery.java RangeQuery.java
Date Wed, 25 Feb 2004 22:29:18 GMT
cutting     2004/02/25 14:29:18

  Modified:    src/java/org/apache/lucene/search PrefixQuery.java
                        RangeQuery.java
  Log:
  Added a few accessors.
  
  Revision  Changes    Path
  1.8       +4 -0      jakarta-lucene/src/java/org/apache/lucene/search/PrefixQuery.java
  
  Index: PrefixQuery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/PrefixQuery.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PrefixQuery.java	12 Aug 2003 09:17:53 -0000	1.7
  +++ PrefixQuery.java	25 Feb 2004 22:29:18 -0000	1.8
  @@ -69,6 +69,9 @@
       this.prefix = prefix;
     }
   
  +  /** Returns the prefix of this query. */
  +  public Term getPrefix() { return prefix; }
  +
     public Query rewrite(IndexReader reader) throws IOException {
       BooleanQuery query = new BooleanQuery();
       TermEnum enumerator = reader.terms(prefix);
  @@ -113,4 +116,5 @@
       }
       return buffer.toString();
     }
  +
   }
  
  
  
  1.11      +14 -4     jakarta-lucene/src/java/org/apache/lucene/search/RangeQuery.java
  
  Index: RangeQuery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/RangeQuery.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- RangeQuery.java	10 Sep 2003 12:24:05 -0000	1.10
  +++ RangeQuery.java	25 Feb 2004 22:29:18 -0000	1.11
  @@ -153,10 +153,20 @@
         return Query.mergeBooleanQueries(queries);
       }
   
  -    private String getField()
  -    {
  -        return (lowerTerm != null ? lowerTerm.field() : upperTerm.field());
  +    /** Returns the field name for this query */
  +    public String getField() {
  +      return (lowerTerm != null ? lowerTerm.field() : upperTerm.field());
       }
  +
  +    /** Returns the lower term of this range query */
  +    public Term getLowerTerm() { return lowerTerm; }
  +
  +    /** Returns the upper term of this range query */
  +    public Term getUpperTerm() { return upperTerm; }
  +
  +    /** Returns <code>true</code> if the range query is inclusive */
  +    public boolean isInclusive() { return inclusive; }
  +
   
       /** Prints a user-readable version of this query. */
       public String toString(String field)
  
  
  

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