mirror of https://github.com/apache/lucene.git
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
This commit is contained in:
parent
4202b65619
commit
d97a9e7adf
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue