From 5547d20f921c270f2dd8879be4d9cc0b0b76e5c1 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Mon, 3 Apr 2006 18:31:32 +0000 Subject: [PATCH] make query parameters on command line be defaults, overridable by specific test git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@391107 13f79535-47bb-0310-9956-ffa450edef68 --- src/apps/SolrTest/src/SolrTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/apps/SolrTest/src/SolrTest.java b/src/apps/SolrTest/src/SolrTest.java index 3525b26d0dd..cf958a54dcf 100644 --- a/src/apps/SolrTest/src/SolrTest.java +++ b/src/apps/SolrTest/src/SolrTest.java @@ -214,7 +214,7 @@ public class SolrTest extends Thread { static SolrRequestHandler handler = // new OldRequestHandler(); new StandardRequestHandler(); - static String qargs = ""; // default query arguments + static String qargs = null; // default query arguments public char[] doReq(String req, String params) { int start=0; @@ -226,10 +226,13 @@ public class SolrTest extends Thread { Map args = new HashMap(); args.put("indent", "on"); args.put("debugQuery", "on"); - args.put("fl", "score"); args.put("version", "2.0"); - params = params==null? qargs : (params + '&' + qargs); + + if (qargs != null) { + if (params==null) params=qargs; + else params = qargs + '&' + params; + } if (params != null) { String[] plist = params.split("&");