lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r825599 - in /lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search: Hits.java IndexSearcher.java Searcher.java
Date Thu, 15 Oct 2009 18:16:36 GMT
Author: mikemccand
Date: Thu Oct 15 18:16:36 2009
New Revision: 825599

URL: http://svn.apache.org/viewvc?rev=825599&view=rev
Log:
fix some javadoc errors before 2.9.1

Modified:
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Hits.java
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/IndexSearcher.java
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Searcher.java

Modified: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Hits.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Hits.java?rev=825599&r1=825598&r2=825599&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Hits.java (original)
+++ lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Hits.java Thu Oct 15
18:16:36 2009
@@ -42,14 +42,13 @@
  * @deprecated
  * see {@link TopScoreDocCollector} and {@link TopDocs} :<br>
  * <pre>
- *   TopScoreDocCollector collector = new TopScoreDocCollector(hitsPerPage);
- *   searcher.search(query, collector);
- *   ScoreDoc[] hits = collector.topDocs().scoreDocs;
- *   for (int i = 0; i < hits.length; i++) {
- *     int docId = hits[i].doc;
+ *   TopScoreDocCollector collector = TopScoreDocCollector.create(hitsPerPage, false);
+ *   searcher.search(new TermQuery(new Term("field", "iterator")), collector);
+ *   ScoreDoc[] docHits = collector.topDocs().scoreDocs;
+ *   for (int i = 0; i < docHits.length; i++) {
+ *     int docId = docHits[i].doc;
  *     Document d = searcher.doc(docId);
- *     // do something with current hit
- *     ...
+ *   }
  * </pre>
  */
 public final class Hits {

Modified: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/IndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/IndexSearcher.java?rev=825599&r1=825598&r2=825599&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/IndexSearcher.java (original)
+++ lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/IndexSearcher.java Thu
Oct 15 18:16:36 2009
@@ -183,11 +183,12 @@
    * Just like {@link #search(Weight, Filter, int, Sort)}, but you choose
    * whether or not the fields in the returned {@link FieldDoc} instances should
    * be set by specifying fillFields.<br>
-   * <b>NOTE:</b> currently, this method tracks document scores and sets them
in
-   * the returned {@link FieldDoc}, however in 3.0 it will move to not track
-   * document scores. If document scores tracking is still needed, you can use
-   * {@link #search(Weight, Filter, Collector)} and pass in a
-   * {@link TopFieldCollector} instance.
+   *
+   * <p>NOTE: this does not compute scores by default.  If you
+   * need scores, create a {@link TopFieldCollector}
+   * instance by calling {@link TopFieldCollector#create} and
+   * then pass that to {@link #search(Weight, Filter,
+   * Collector)}.</p>
    */
   public TopFieldDocs search(Weight weight, Filter filter, final int nDocs,
                              Sort sort, boolean fillFields)

Modified: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Searcher.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Searcher.java?rev=825599&r1=825598&r2=825599&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Searcher.java (original)
+++ lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/Searcher.java Thu Oct
15 18:16:36 2009
@@ -79,11 +79,11 @@
    * <code>filter</code> if non-null, and sorting the hits by the criteria in
    * <code>sort</code>.
    * 
-   * <b>NOTE:</b> currently, this method tracks document scores and sets them
in
-   * the returned {@link FieldDoc}, however in 3.0 it will move to not track
-   * document scores. If document scores tracking is still needed, you can use
-   * {@link #search(Weight, Filter, Collector)} and pass in a
-   * {@link TopFieldCollector} instance.
+   * <p>NOTE: this does not compute scores by default.  If
+   * you need scores, create a {@link TopFieldCollector}
+   * instance by calling {@link TopFieldCollector#create}
+   * and then pass that to {@link #search(Query, Filter,
+   * Collector)}.</p>
    *
    * @throws BooleanQuery.TooManyClauses
    */



Mime
View raw message