From d97a9e7adfc3445b9a746ff33c1edecbf871b773 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Mon, 3 Apr 2006 18:10:09 +0000 Subject: [PATCH] ability to specify/override query parameters from command line git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@391099 13f79535-47bb-0310-9956-ffa450edef68 --- src/apps/SolrTest/src/SolrTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/apps/SolrTest/src/SolrTest.java b/src/apps/SolrTest/src/SolrTest.java index 666726a65fd..3525b26d0dd 100644 --- a/src/apps/SolrTest/src/SolrTest.java +++ b/src/apps/SolrTest/src/SolrTest.java @@ -214,6 +214,7 @@ public class SolrTest extends Thread { static SolrRequestHandler handler = // new OldRequestHandler(); new StandardRequestHandler(); + static String qargs = ""; // default query arguments public char[] doReq(String req, String params) { int start=0; @@ -228,6 +229,8 @@ public class SolrTest extends Thread { args.put("fl", "score"); args.put("version", "2.0"); + params = params==null? qargs : (params + '&' + qargs); + if (params != null) { String[] plist = params.split("&"); for (String decl : plist) { @@ -321,6 +324,8 @@ public class SolrTest extends Thread { testFile=args[i++]; } else if (arg.equals("-noValidate")) { doValidate=false; + } else if (arg.equals("-qargs")) { + qargs=args[i++]; } else { System.out.println("Unknown option: " + arg); return;