From: Niels Erik G. Nielsen Date: Tue, 14 May 2013 16:29:35 +0000 (-0400) Subject: Fixes missing search command instruction to pz2 client X-Git-Tag: v0.0.7~104 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=980d3604794a7135590c02beb9420dc8931e703c;p=mkjsf-moved-to-github.git Fixes missing search command instruction to pz2 client --- diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Bean.java b/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Bean.java index 1c0fc07..9c43ddd 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Bean.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Bean.java @@ -121,6 +121,7 @@ public class Pz2Bean implements Pz2Interface, StateListener, Configurable, Seria pzreq.getRecord().removeParametersInState(); pzreq.getShow().setParameterInState(new CommandParameter("start","=",0)); logger.debug(Utils.objectId(this) + " is searching using "+pzreq.getCommand("search").getUrlEncodedParameterValue("query")); + searchClient.setSearchCommand(pzreq.getCommand("search")); doCommand("search"); } } @@ -284,7 +285,7 @@ public class Pz2Bean implements Pz2Interface, StateListener, Configurable, Seria protected void handleQueryStateChanges (String commands) { if (stateMgr.hasPendingStateChange("search") && hasQuery()) { - logger.info("Triggered search: Found pending search change, doing search before updating " + commands); + logger.info("Triggered search: Found pending search change [" + pzreq.getCommand("search").toString() + "], doing search before updating " + commands); doSearch(); } if (stateMgr.hasPendingStateChange("record") && ! commands.equals("record")) { @@ -307,7 +308,7 @@ public class Pz2Bean implements Pz2Interface, StateListener, Configurable, Seria */ protected ResponseDataObject doCommand(String commandName) { ResponseDataObject responseObject = null; - // logger.debug(pzreq.getCommand(commandName).getEncodedQueryString() + ": Results for "+ pzreq.getCommand("search").getEncodedQueryString()); + logger.info("Request "+commandName + ": "+ pzreq.getCommand("search").toString()); Pazpar2Command command = pzreq.getCommand(commandName); long start = System.currentTimeMillis(); HttpResponseWrapper commandResponse = searchClient.executeCommand(command);