From 980d3604794a7135590c02beb9420dc8931e703c Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Tue, 14 May 2013 12:29:35 -0400 Subject: [PATCH] Fixes missing search command instruction to pz2 client --- src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Bean.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 1.7.10.4