Revision: 14710
          http://gate.svn.sourceforge.net/gate/?rev=14710&view=rev
Author:   valyt
Date:     2011-12-09 11:45:14 +0000 (Fri, 09 Dec 2011)
Log Message:
-----------
Added constant for default score (1.0) used for all documents when not doing 
actual scoring.

Added comment about the rank parameter for all methods.

Modified Paths:
--------------
    mimir/trunk/mimir-core/src/gate/mimir/search/QueryRunner.java

Modified: mimir/trunk/mimir-core/src/gate/mimir/search/QueryRunner.java
===================================================================
--- mimir/trunk/mimir-core/src/gate/mimir/search/QueryRunner.java       
2011-12-09 11:43:39 UTC (rev 14709)
+++ mimir/trunk/mimir-core/src/gate/mimir/search/QueryRunner.java       
2011-12-09 11:45:14 UTC (rev 14710)
@@ -41,7 +41,14 @@
  * documents are returned in decreasing score order. 
  */
 public interface QueryRunner {
+  
   /**
+   * The default score given to all documents when actual scoring is not being 
+   * performed.  
+   */
+  public final double DEFAULT_SCORE = 1.0;
+  
+  /**
    * Gets the number of result documents.
    * @return <code>-1</code> if the search has not yet completed, the total 
    * number of result document otherwise. 
@@ -54,7 +61,7 @@
    * {@link #getDocumentsCount()}. 
    * @return the number of result documents known so far.
    */
-  public int getCurrentDocumentsCount();
+  public int getDocumentsCurrentCount();
 
   /**
    * Gets the ID of a result document.
@@ -101,7 +108,8 @@
 
   /**
    * Gets a segment of the document text for a given document.
-   * @param rank the rank of the requested document.
+   * @param rank the rank of the requested document. This should be a value 
+   * between 0 and {@link #getDocumentsCount()} -1.
    * @param termPosition the first term requested.
    * @param length the number of terms requested.
    * @return two parallel String arrays, one containing term text, the other 
@@ -117,7 +125,8 @@
 
   /**
    * Obtains the URI for a given document.
-   * @param rank the rank for the requested document.
+   * @param rank the rank for the requested document. This should be a value 
+   * between 0 and {@link #getDocumentsCount()} -1.
    * @return the URI provided at indexing time for the document.
    * @throws IndexException
    * @throws IndexOutOfBoundsException
@@ -128,7 +137,8 @@
 
   /**
    * Obtains the title for a given document.
-   * @param rank the rank of the requested document.
+   * @param rank the rank of the requested document. This should be a value 
+   * between 0 and {@link #getDocumentsCount()} -1.
    * @return the document title (provided at indexing time).
    * @throws IndexException
    * @throws IndexOutOfBoundsException
@@ -143,7 +153,8 @@
    * {@link Serializable} values as metadata fields for the documents being
    * indexed. This method is used at search time to retrieve those values.
    * 
-   * @param rank the rank for the requested document.
+   * @param rank the rank for the requested document. This should be a value 
+   * between 0 and {@link #getDocumentsCount()} -1.
    * @param fieldName the field name for which the value is sought.
    * @return
    * @throws IndexException
@@ -160,7 +171,8 @@
    * {@link Serializable} values as metadata fields for the documents being
    * indexed. This method is used at search time to retrieve those values.
    * 
-   * @param rank the rank for the requested document.
+   * @param rank the rank for the requested document. This should be a value 
+   * between 0 and {@link #getDocumentsCount()} -1.
    * @param fieldNames the names of the metadata fields for which the values 
are 
    * requested.
    * @return a {@link Map} linking field names with their values.
@@ -176,7 +188,8 @@
    * Render the content of the given document, with the hits for this query
    * highlighted.
    * 
-   * @param rank the rank for the requested document.
+   * @param rank the rank for the requested document. This should be a value 
+   * between 0 and {@link #getDocumentsCount()} -1.
    * @param out an {@link Appendable} to which the output is written.
    * @throws IOException
    * @throws IndexException

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to