lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r884872 - /lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Collector.java
Date Fri, 27 Nov 2009 13:40:09 GMT
Author: mikemccand
Date: Fri Nov 27 13:40:09 2009
New Revision: 884872

URL: http://svn.apache.org/viewvc?rev=884872&view=rev
Log:
improve javadocs for Collector.acceptsDocsOutOfOrder

Modified:
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Collector.java

Modified: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Collector.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Collector.java?rev=884872&r1=884871&r2=884872&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Collector.java (original)
+++ lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Collector.java Fri Nov
27 13:40:09 2009
@@ -165,14 +165,20 @@
   public abstract void setNextReader(IndexReader reader, int docBase) throws IOException;
 
   /**
-   * Returns true iff this {@link Collector} can accept documents given to
-   * {@link #collect(int)} out of order.
-   * <p>
-   * NOTE: some collectors can work in either mode, with a more efficient
-   * implementation for in-order docs collection. If your collector can work in
-   * either mode, it is recommended that you create two variants of it, since
-   * some queries work much faster if out-of-order collection is supported by a
-   * {@link Collector}.
+   * Return <code>true</code> if this collector does not
+   * require the matching docIDs to be delivered in int sort
+   * order (smallest to largest) to {@link #collect}.
+   *
+   * <p> Most Lucene Query implementations will visit
+   * matching docIDs in order.  However, some queries
+   * (currently limited to certain cases of {@link
+   * BooleanQuery}) can achieve faster searching if the
+   * <code>Collector</code> allows them to deliver the
+   * docIDs out of order.</p>
+   *
+   * <p> Many collectors don't mind getting docIDs out of
+   * order, so it's important to return <code>true</code>
+   * here.
    */
   public abstract boolean acceptsDocsOutOfOrder();
   



Mime
View raw message