Author: daniele
Date: 2007-06-06 18:48:43 +0200 (Wed, 06 Jun 2007)
New Revision: 5284
Modified:
branches/2.13/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
Log:
changes required for search-2752, 2759 and 2763
Modified:
branches/2.13/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
===================================================================
---
branches/2.13/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
2007-06-06 13:13:02 UTC (rev 5283)
+++
branches/2.13/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
2007-06-06 16:48:43 UTC (rev 5284)
@@ -197,7 +197,12 @@
private WhoWhereSplit initialiseWhoWhere() {
final CatalogueCommandConfig conf = (CatalogueCommandConfig)
context.getSearchConfiguration();
-
+ if(datamodel.getParameters().getValue("who")!=null)
LOG.info("datamodel.getParameters().getValue(who) is
"+datamodel.getParameters().getValue("who"));
+ else LOG.info("datamodel.getParameters().getValue(who) is NULL");
+
+ if(datamodel.getParameters().getValue("q")!=null)
LOG.info("datamodel.getParameters().getValue(q) is
"+datamodel.getParameters().getValue("who"));
+ else LOG.info("datamodel.getParameters().getValue(q) is NULL");
+
String whoParameter
= datamodel.getParameters().getValue("who")!=null ?
datamodel.getParameters().getValue("who").getString() :
datamodel.getQuery().getString();
@@ -232,8 +237,6 @@
splitQuery = ww;
}
- LOG.debug(DEBUG_SEARCHING_1 + splitQuery.getWho());
- LOG.debug(DEBUG_SEARCHING_2 + splitQuery.getWhere());
}
return splitQuery;
@@ -329,13 +332,16 @@
result.addResults(nyResultListe);
// add the who and where fields (preferred over using them out of the
junkyard)
- result.addField(PARAMETER_NAME_WHAT, getTransformedQuerySesamSyntax());
+ // WHY!? When displaying the infopage, getTransformedQuerySesamSyntax
returns NULL.
+ // hmm. getQuery().getQueryString() always return the plain text
search string for the query.
+ //result.addField(PARAMETER_NAME_WHAT,
getTransformedQuerySesamSyntax());
+
+ result.addField(PARAMETER_NAME_WHAT, getQuery().getQueryString());
result.addField(PARAMETER_NAME_WHERE, whereString);
- // XXX deprecated approach
- getParameters().put(PARAMETER_NAME_WHAT,
getTransformedQuerySesamSyntax());
- getParameters().put(PARAMETER_NAME_WHERE, whereString);
-
+ LOG.debug(DEBUG_SEARCHING_1 + getQuery().getQueryString());
+ LOG.debug(DEBUG_SEARCHING_2 + whereString);
+
result.addField("sortBy",getSortBy());
return result;
}
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits