lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject svn commit: r355997 - /lucene/java/trunk/src/java/org/apache/lucene/search/Query.java
Date Sun, 11 Dec 2005 19:18:56 GMT
Author: dnaber
Date: Sun Dec 11 11:18:50 2005
New Revision: 355997

URL: http://svn.apache.org/viewcvs?rev=355997&view=rev
Log:
document that extractTerms() can throw an exception if it's called on a non-rewritten query

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/search/Query.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/Query.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/search/Query.java?rev=355997&r1=355996&r2=355997&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/Query.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/Query.java Sun Dec 11 11:18:50 2005
@@ -97,7 +97,10 @@
     return weight;
   }
 
-  /** Expert: called to re-write queries into primitive queries. */
+  /** Expert: called to re-write queries into primitive queries. For example,
+   * a PrefixQuery will be rewritten into a BooleanQuery that consists
+   * of TermQuerys.
+   */
   public Query rewrite(IndexReader reader) throws IOException {
     return this;
   }
@@ -148,7 +151,10 @@
   }
 
   /**
-   * Expert: adds all terms occuring in this query to the terms set
+   * Expert: adds all terms occuring in this query to the terms set. Only
+   * works if this query is in its {@link #rewrite rewritten} form.
+   * 
+   * @throws UnsupportedOperationException if this query is not yet rewritten
    */
   public void extractTerms(Set terms) {
     // needs to be implemented by query subclasses



Mime
View raw message