bradford 02/02/22 19:26:27
Modified: java/src/org/apache/xindice/core/filer Paged.java
java/src/org/apache/xindice/core/indexer IndexManager.java
Log:
Added flush statements to close and create as well as open in the
IndexManager
Revision Changes Path
1.3 +4 -2
xml-xindice/java/src/org/apache/xindice/core/filer/Paged.java
Index: Paged.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/src/org/apache/xindice/core/filer/Paged.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Paged.java 15 Feb 2002 02:36:34 -0000 1.2
+++ Paged.java 23 Feb 2002 03:26:27 -0000 1.3
@@ -56,7 +56,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- * $Id: Paged.java,v 1.2 2002/02/15 02:36:34 bradford Exp $
+ * $Id: Paged.java,v 1.3 2002/02/23 03:26:27 bradford Exp $
*/
import org.apache.xindice.util.*;
@@ -335,7 +335,8 @@
try {
raf = new RandomAccessFile(file, "rw");
fileHeader.write();
- raf.close();
+ flush();
+ raf.close();
return true;
}
catch ( Exception e ) {
@@ -362,6 +363,7 @@
public boolean close() throws DBException {
try {
if ( isOpened() ) {
+ flush();
opened = false;
raf.close();
return true;
1.4 +11 -12
xml-xindice/java/src/org/apache/xindice/core/indexer/IndexManager.java
Index: IndexManager.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/src/org/apache/xindice/core/indexer/IndexManager.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- IndexManager.java 22 Feb 2002 23:02:29 -0000 1.3
+++ IndexManager.java 23 Feb 2002 03:26:27 -0000 1.4
@@ -56,7 +56,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- * $Id: IndexManager.java,v 1.3 2002/02/22 23:02:29 kstaken Exp $
+ * $Id: IndexManager.java,v 1.4 2002/02/23 03:26:27 bradford Exp $
*/
import org.apache.xindice.core.*;
@@ -296,10 +296,9 @@
org.apache.xindice.Stopwatch sw = new
org.apache.xindice.Stopwatch("Populated Indexes", true);
for ( int i = 0; i < list.length; i++ ) {
try {
- if ( !list[i].indexer.exists() ) {
+ if ( !list[i].indexer.exists() )
list[i].indexer.create();
- list[i].indexer.open();
- }
+ list[i].indexer.open();
}
catch ( Exception e ) {
org.apache.xindice.Debug.printStackTrace(e);
@@ -461,17 +460,17 @@
events.setContentHandler(this);
events.setProperty(HANDLER, this);
events.start();
+
+ if ( action == ACTION_CREATE || action == ACTION_UPDATE ) {
+ try {
+ collection.flushSymbolTable();
+ }
+ catch ( Exception e ) {
+ }
+ }
}
catch ( Exception e ) {
org.apache.xindice.Debug.printStackTrace(e);
- }
-
- if ( action == ACTION_CREATE || action == ACTION_UPDATE ) {
- try {
- collection.flushSymbolTable();
- }
- catch ( Exception e ) {
- }
}
}