Revision: 14820
http://gate.svn.sourceforge.net/gate/?rev=14820&view=rev
Author: valyt
Date: 2011-12-21 10:10:13 +0000 (Wed, 21 Dec 2011)
Log Message:
-----------
Copied a bug fix for the OR operator from 4.0 trunk.
New version: 3.4.1 (will become a tag)
Modified Paths:
--------------
mimir/branches/3.4/build.properties
mimir/branches/3.4/mimir-core/src/gate/mimir/search/query/OrQuery.java
Modified: mimir/branches/3.4/build.properties
===================================================================
--- mimir/branches/3.4/build.properties 2011-12-21 10:08:59 UTC (rev 14819)
+++ mimir/branches/3.4/build.properties 2011-12-21 10:10:13 UTC (rev 14820)
@@ -1,4 +1,4 @@
-app.version=3.4.0
+app.version=3.4.1
mimir-core.dirname=mimir-core
mimir-client.dirname=mimir-client
plugins.dirname=plugins
Modified: mimir/branches/3.4/mimir-core/src/gate/mimir/search/query/OrQuery.java
===================================================================
--- mimir/branches/3.4/mimir-core/src/gate/mimir/search/query/OrQuery.java
2011-12-21 10:08:59 UTC (rev 14819)
+++ mimir/branches/3.4/mimir-core/src/gate/mimir/search/query/OrQuery.java
2011-12-21 10:10:13 UTC (rev 14820)
@@ -112,20 +112,18 @@
public int nextDocument(int greaterThan) throws IOException {
if(closed) return latestDocument = -1;
if(latestDocument == -1) return latestDocument;
- if(latestDocument != -2) {
- // advance
- int first = queue.first();
- while(currentDoc[first] == latestDocument ||
- currentDoc[first] <= greaterThan) {
- currentDoc[first] = executors.nextDocument(first, greaterThan);
- if(currentDoc[first] < 0) {
- queue.dequeue();
- if(queue.isEmpty()) return latestDocument = -1;
- } else {
- queue.changed();
- }
- first = queue.first();
+ // advance
+ int first = queue.first();
+ while(currentDoc[first] == latestDocument ||
+ currentDoc[first] <= greaterThan) {
+ currentDoc[first] = executors.nextDocument(first, greaterThan);
+ if(currentDoc[first] < 0) {
+ queue.dequeue();
+ if(queue.isEmpty()) return latestDocument = -1;
+ } else {
+ queue.changed();
}
+ first = queue.first();
}
latestDocument = currentDoc[queue.first()];
// collect all the hits from the current document
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs