Revision: 14697
http://gate.svn.sourceforge.net/gate/?rev=14697&view=rev
Author: valyt
Date: 2011-12-08 10:25:13 +0000 (Thu, 08 Dec 2011)
Log Message:
-----------
Few small bugfixes.
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-08 10:24:31 UTC (rev 14696)
+++ mimir/trunk/mimir-core/src/gate/mimir/search/RankingQueryRunnerImpl.java
2011-12-08 10:25:13 UTC (rev 14697)
@@ -117,7 +117,8 @@
}
try {
- int docIndex = (documentIndexes != null ? documentIndexes[start] :
start);
+ // see if we can get at the first document
+ int docIndex = (documentIndexes != null ? documentIndexes[0] : start);
int docId = documentIds.getInt(docIndex);
if(queryExecutor.getLatestDocument() < 0 ||
queryExecutor.getLatestDocument() >= docId) {
@@ -128,8 +129,7 @@
oldExecutor.close();
}
for(int i = start; i < end; i++) {
- docIndex = (documentIndexes != null ?
- documentIndexes[i - start] : start);
+ docIndex = (documentIndexes != null ? documentIndexes[i - start] :
i);
docId = documentIds.getInt(docIndex);
int newDoc = queryExecutor.nextDocument(docId - 1);
// sanity check
@@ -197,7 +197,7 @@
}
}
while(docId >= 0) {
- documentIds.add(docId);
+ // enlarge the hits list
if(scoring){
documentScores.add(scorer.score());
documentHits.add(null);
@@ -215,6 +215,8 @@
documentHits.add(null);
}
}
+ // and store the new doc ID
+ documentIds.add(docId);
docId = scoring ? scorer.nextDocument(-1) :
queryExecutor.nextDocument(-1);
}
allDocIdsCollected = true;
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