Author: daniele
Date: 2007-05-15 15:22:02 +0200 (Tue, 15 May 2007)
New Revision: 5092

Modified:
   
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
Log:
GULD-526: basic operation should be implemented ok now. Still has to fix 
sponsed links after who/where logic changes.

Modified: 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
===================================================================
--- 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
  2007-05-15 11:55:11 UTC (rev 5091)
+++ 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
  2007-05-15 13:22:02 UTC (rev 5092)
@@ -307,10 +307,9 @@
      */
     public ResultList<? extends ResultItem> execute() {
 
-        final ResultList<ResultItem> result = (ResultList<ResultItem>) 
super.execute();
+        ResultList<ResultItem> result = (ResultList<ResultItem>) 
super.execute();
+        List<CatalogueSearchResultItem> nyResultListe = new 
ArrayList<CatalogueSearchResultItem>();
 
-        final List<CatalogueSearchResultItem> nyResultListe = new 
ArrayList<CatalogueSearchResultItem>();
-
         for (Iterator iter = result.getResults().listIterator(); 
iter.hasNext();) {
 
             final BasicSearchResultItem basicResultItem = 
(BasicSearchResultItem) iter.next();
@@ -331,9 +330,12 @@
         result.getResults().addAll(nyResultListe);
 
         // add the who and where fields (preferred over using them out of the 
junkyard)
+        LOG.info("Putting what/where values on the result, 
what->"+getTransformedQuerySesamSyntax());
+        LOG.info("Putting what/where values on the result, 
where->"+whereString);
         result.addField(PARAMETER_NAME_WHAT, getTransformedQuerySesamSyntax());
         result.addField(PARAMETER_NAME_WHERE, whereString);
 
+        
         // XXX deprecated approach
         getParameters().put(PARAMETER_NAME_WHAT, 
getTransformedQuerySesamSyntax());
         getParameters().put(PARAMETER_NAME_WHERE, whereString);
@@ -417,6 +419,8 @@
         
         if ("name".equalsIgnoreCase(userSortBy)) {
             sortBy = SORTBY_COMPANYNAME;
+        }else if("kw".equalsIgnoreCase(userSortBy)){
+            sortBy = SORTBY_KEYWORD;
         }
         
         final ParametersDataObject pdo = datamodel.getParameters();

_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits

Reply via email to