Author: gttersen
Date: 2007-05-02 12:10:22 +0200 (Wed, 02 May 2007)
New Revision: 4934

Modified:
   
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/NewsAggregatorSearchCommand.java
Log:
newsAggregator changes

Modified: 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/NewsAggregatorSearchCommand.java
===================================================================
--- 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/NewsAggregatorSearchCommand.java
     2007-05-01 12:55:53 UTC (rev 4933)
+++ 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/NewsAggregatorSearchCommand.java
     2007-05-02 10:10:22 UTC (rev 4934)
@@ -176,12 +176,15 @@
 
         public FastSearchResult parseCluster(NewsAggregatorCommandConfig 
config, InputStream inputStream, String clusterId, NewsAggregatorSearchCommand 
searchCommand) throws JDOMException, IOException {
             try {
+                LOG.debug("Parsing cluster: " + clusterId);
                 final FastSearchResult searchResult = new 
FastSearchResult(searchCommand);
                 final Document doc = getDocument(inputStream);
                 final Element root = doc.getRootElement();
                 List<Element> clusters = root.getChildren(ELEMENT_CLUSTER);
                 for (Element cluster : clusters) {
+                    LOG.debug("Looking at element: " + cluster.getName() + ", 
clusterId=" + cluster.getAttributeValue(ATTRIBUTE_CLUSTERID));
                     if 
(cluster.getAttributeValue(ATTRIBUTE_CLUSTERID).equals(clusterId)) {
+                        LOG.debug("Found correct cluster. Handling.");
                         handleFlatCluster(config, cluster, searchCommand, 
searchResult);
                         handleRelated(config, 
cluster.getChild(ELEMENT_RELATED), searchResult);
                         break;
@@ -279,7 +282,7 @@
 
         private void handleFlatCluster(NewsAggregatorCommandConfig config, 
Element cluster, SearchCommand searchCommand, SearchResult searchResult) {
             if (cluster != null) {
-                final Element entryCollectionElement = 
cluster.getChild(config.getNestedResultsField());
+                final Element entryCollectionElement = 
cluster.getChild(ELEMENT_ENTRY_COLLECTION);
                 if (entryCollectionElement != null) {
                     final List<Element> entryList = 
entryCollectionElement.getChildren();
                     searchResult.setHitCount(entryList.size());

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

Reply via email to