You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by ho...@apache.org on 2010/02/24 03:09:22 UTC

svn commit: r915637 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/util/TestHarness.java

Author: hossman
Date: Wed Feb 24 02:09:21 2010
New Revision: 915637

URL: http://svn.apache.org/viewvc?rev=915637&view=rev
Log:
SOLR-1792: Documented peculiar behavior of TestHarness.LocalRequestFactory

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/src/java/org/apache/solr/util/TestHarness.java

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=915637&r1=915636&r2=915637&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Wed Feb 24 02:09:21 2010
@@ -260,6 +260,9 @@
 * SOLR-1590: Javadoc for XMLWriter#startTag
   (Chris A. Mattmann via hossman)
 
+* SOLR-1792: Documented peculiar behavior of TestHarness.LocalRequestFactory
+  (hossman)
+
 ================== Release 1.4.0 ==================
 Release Date:  See http://lucene.apache.org/solr for the official release date.
 

Modified: lucene/solr/trunk/src/java/org/apache/solr/util/TestHarness.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/util/TestHarness.java?rev=915637&r1=915636&r2=915637&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/util/TestHarness.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/util/TestHarness.java Wed Feb 24 02:09:21 2010
@@ -552,6 +552,24 @@
     public Map<String,String> args = new HashMap<String,String>();
     public LocalRequestFactory() {
     }
+    /**
+     * Creates a LocalSolrQueryRequest based on variable args; for
+     * historical reasons, this method has some peculiar behavior:
+     * <ul>
+     *   <li>If there is a single arg, then it is treated as the "q"
+     *       param, and the LocalSolrQueryRequest consists of that query
+     *       string along with "qt", "start", and "rows" params (based
+     *       on the qtype, start, and limit properties of this factory)
+     *       along with any other default "args" set on this factory.
+     *   </li>
+     *   <li>If there are multiple args, then there must be an even number
+     *       of them, and each pair of args is used as a key=value param in
+     *       the LocalSolrQueryRequest.  <b>NOTE: In this usage, the "qtype",
+     *       "start", "limit", and "args" properties of this factory are
+     *       ignored.</b>
+     *   </li>
+     * </ul>
+     */
     public LocalSolrQueryRequest makeRequest(String ... q) {
       if (q.length==1) {
         return new LocalSolrQueryRequest(TestHarness.this.getCore(),