Revision: 17189
http://sourceforge.net/p/gate/code/17189
Author: valyt
Date: 2013-12-19 19:06:01 +0000 (Thu, 19 Dec 2013)
Log Message:
-----------
Bugfix: the sum of max positions was wrongly calculated.
Modified Paths:
--------------
mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java
Modified: mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java
===================================================================
--- mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java
2013-12-19 17:53:32 UTC (rev 17188)
+++ mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java
2013-12-19 19:06:01 UTC (rev 17189)
@@ -121,6 +121,7 @@
* The total number of occurrences stored.
*/
private long occurrences = 0;
+
/**
* The sum of the maximum positions for each document.
*/
@@ -192,7 +193,7 @@
// added to positions, but we now need to store their count
counts.add(count);
if(count > maxCount) maxCount = count;
- sumMaxPos += positions.get(count - 1);
+ sumMaxPos += lastPosition;
occurrences += count;
}
count = 0;
@@ -222,19 +223,8 @@
OutputBitStream obs = indexWriter.newDocumentRecord();
indexWriter.writeDocumentPointer(obs, currDocumentPointer);
indexWriter.writePositionCount(obs, currCount);
-StringBuilder str = new StringBuilder("Writing " + currCount +
- " positions from " + positionsStart + ": [");
-for(int i = positionsStart; i < positionsStart + currCount; i++) {
- str.append(positions.elements()[i]);
- str.append(' ');
-}
-str.append("]");
-logger.info(str);
-
indexWriter.writeDocumentPositions(obs, positions.elements(),
positionsStart, currCount, -1);
-
-
positionsStart += currCount;
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs