Author: sshafroi
Date: 2008-06-04 14:07:20 +0200 (Wed, 04 Jun 2008)
New Revision: 6666

Modified:
   trunk/
   
trunk/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
Log:
Merged revisions 6648-6665 via svnmerge from 
http://sesat.no/svn/sesat-kernel/branches/2.17

........
  r6660 | ssmiweve | 2008-06-04 12:06:42 +0200 (Wed, 04 Jun 2008) | 1 line
  
  (NewsEspSearchCommand, 2.17 )Method createCollapsedResults runs even if 
collapsing is not enabled?
........



Property changes on: trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /branches/2.10:1-4690,4692-4745 /branches/2.11:1-4933 
/branches/2.12:1-5051,5053-5106 /branches/2.13:1-5378 /branches/2.14:1-5508 
/branches/2.15:1-5995 /branches/2.16:1-6499 /branches/2.17:1-6647 
/branches/2.6:1-3877 /branches/2.7:1-4160 /branches/2.8:1-4446 
/branches/2.9:1-4626 /branches/MAP_SEARCHv2:1-4544
   + /branches/2.10:1-4690,4692-4745 /branches/2.11:1-4933 
/branches/2.12:1-5051,5053-5106 /branches/2.13:1-5378 /branches/2.14:1-5508 
/branches/2.15:1-5995 /branches/2.16:1-6499 /branches/2.17:1-6665 
/branches/2.6:1-3877 /branches/2.7:1-4160 /branches/2.8:1-4446 
/branches/2.9:1-4626 /branches/MAP_SEARCHv2:1-4544

Modified: 
trunk/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
===================================================================
--- 
trunk/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
        2008-06-04 12:05:08 UTC (rev 6665)
+++ 
trunk/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
        2008-06-04 12:07:20 UTC (rev 6666)
@@ -161,15 +161,22 @@
     @Override
     protected FastSearchResult<ResultItem> createSearchResult(final 
IQueryResult result) throws IOException {
 
+        FastSearchResult<ResultItem> fastResult = null;
+
         final NewsEspCommandConfig config = getSearchConfiguration();
-        try {
-            return createCollapsedResults(config, getOffset(), result);
-        } catch (final IllegalType e) {
-            LOG.error("Could not convert result", e);
-        } catch (final EmptyValueException e) {
-            LOG.error("Could not convert result", e);
+        if(config.isCollapsingEnabled()){
+            try {
+                fastResult = createCollapsedResults(config, getOffset(), 
result);
+
+            } catch (final IllegalType e) {
+                LOG.error("Could not convert result", e);
+            } catch (final EmptyValueException e) {
+                LOG.error("Could not convert result", e);
+            }
+        }else{
+            fastResult = super.createSearchResult(result);
         }
-        return super.createSearchResult(result);
+        return fastResult;
     }
 
     private void addMedium(final Clause clause) {
@@ -362,7 +369,9 @@
                         collectedHits++;
                     }
                 } else {
-                    addResult(config, parentResult, document);
+                    if(config.isExpansionEnabled()){
+                        addResult(config, parentResult, document);
+                    }
                     parentResult.setHitCount(parentResult.getHitCount() + 1);
                     collectedHits++;
                 }

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

Reply via email to