Author: magnuse
Date: 2006-04-20 10:19:10 +0200 (Thu, 20 Apr 2006)
New Revision: 2772
Modified:
branches/MOBILE_SESAM/src/java/no/schibstedsok/front/searchportal/command/MobileSearchCommand.java
Log:
Fixed offset bug.
Modified:
branches/MOBILE_SESAM/src/java/no/schibstedsok/front/searchportal/command/MobileSearchCommand.java
===================================================================
---
branches/MOBILE_SESAM/src/java/no/schibstedsok/front/searchportal/command/MobileSearchCommand.java
2006-04-20 08:02:10 UTC (rev 2771)
+++
branches/MOBILE_SESAM/src/java/no/schibstedsok/front/searchportal/command/MobileSearchCommand.java
2006-04-20 08:19:10 UTC (rev 2772)
@@ -92,6 +92,8 @@
params.setParameter(new SearchParameter(BaseParameter.QUERY,
getQuery().getQueryString()));
+ params.setParameter(new SearchParameter("offset",
getCurrentOffset(0)));
+
final IPersonalizationSpecification ps =
ExplicitUserGroupPersonalizationFactory.getUserGroupSpecification(cfg.getPersonalizationGroup());
final IQuery query = new Query(params);
final List results = cap != null ? engine.search(query, ps, cap) :
engine.search(query, ps);
@@ -116,10 +118,9 @@
searchResult.setHitCount(result.getDocCount());
for (int i = cnt; i < maxIndex; i++) {
- final IDocumentSummary document = result.getDocument(i + 1);
-
//catch nullpointerException because of unaccurate doccount
try {
+ final IDocumentSummary document = result.getDocument(i +
1);
final SearchResultItem item = createResultItem(document);
searchResult.addResult(item);
} catch (NullPointerException e) {
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits