Revision: 14685
http://gate.svn.sourceforge.net/gate/?rev=14685&view=rev
Author: valyt
Date: 2011-12-07 15:20:00 +0000 (Wed, 07 Dec 2011)
Log Message:
-----------
Beginnings of a bug fix for non-ranking mode when browsing over the first block
of documents.
Modified Paths:
--------------
mimir/trunk/mimir-core/src/gate/mimir/search/RankingQueryRunnerImpl.java
Modified:
mimir/trunk/mimir-core/src/gate/mimir/search/RankingQueryRunnerImpl.java
===================================================================
--- mimir/trunk/mimir-core/src/gate/mimir/search/RankingQueryRunnerImpl.java
2011-12-07 14:44:34 UTC (rev 14684)
+++ mimir/trunk/mimir-core/src/gate/mimir/search/RankingQueryRunnerImpl.java
2011-12-07 15:20:00 UTC (rev 14685)
@@ -568,9 +568,14 @@
} else {
// calculate an appropriate interval to collect hits for
SortedMap<int[], Future<?>> tailMap = hitCollectors.tailMap(interval);
- int[] followingInterval = tailMap.isEmpty() ?
- new int[]{documentsOrder.size(), documentsOrder.size()} :
- tailMap.firstKey();
+ int[] followingInterval;
+ if(tailMap.isEmpty()) {
+ int maxBoundary = (documentsOrder != null) ?
+ documentsOrder.size() : interval[1] + docBlockSize / 2;
+ followingInterval = new int[]{maxBoundary, maxBoundary};
+ } else {
+ followingInterval = tailMap.firstKey();
+ }
int start = Math.max(previousInterval[1], interval[0]);
int end = Math.min(followingInterval[0], interval[1]);
hitsCollector = new HitsCollector(start, end);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs