Author: ssmiweve
Date: 2008-06-04 12:06:42 +0200 (Wed, 04 Jun 2008)
New Revision: 6660
Modified:
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
Log:
(NewsEspSearchCommand, 2.17 )Method createCollapsedResults runs even if
collapsing is not enabled?
Modified:
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
===================================================================
---
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
2008-06-04 10:03:56 UTC (rev 6659)
+++
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
2008-06-04 10:06:42 UTC (rev 6660)
@@ -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