Revision: 17259
          http://sourceforge.net/p/gate/code/17259
Author:   valyt
Date:     2014-01-29 18:29:53 +0000 (Wed, 29 Jan 2014)
Log Message:
-----------
Following advice from Sebastiano, it looks like we'll have to write our own 
direct index merger. Should be pretty simple, hopefully...

Modified Paths:
--------------
    mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java
    mimir/branches/5.0/mimir-test/src/gate/mimir/test/Scratch.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 
2014-01-29 17:55:48 UTC (rev 17258)
+++ mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java 
2014-01-29 18:29:53 UTC (rev 17259)
@@ -42,6 +42,7 @@
 import it.unimi.di.big.mg4j.io.IOFactory;
 import it.unimi.di.big.mg4j.tool.Combine;
 import it.unimi.di.big.mg4j.tool.Concatenate;
+import it.unimi.di.big.mg4j.tool.Merge;
 import it.unimi.di.big.mg4j.tool.Scan;
 import it.unimi.di.big.mg4j.tool.Combine.IndexType;
 import it.unimi.dsi.big.io.FileLinesCollection;
@@ -1277,7 +1278,7 @@
         * @throws IndexException 
         * @throws IOException 
         */
-       protected void compressIndex() throws IndexException, IOException {
+       protected void compactIndex() throws IndexException, IOException {
          File headDirNew = new File(indexDirectory, HEAD_FILE_NAME + 
HEAD_NEW_EXT);
          // make a local copy of the sub-indexes
          List<MG4JIndex> indexesToMerge = 
@@ -1334,7 +1335,7 @@
             name + DIRECT_INDEX_NAME_SUFFIX).getAbsolutePath(); 
       }
       try {
-        new Concatenate(
+        new Merge(
             IOFactory.FILESYSTEM_FACTORY,
             outputBaseName,
             inputBaseNames,
@@ -1532,7 +1533,7 @@
             } else if(aDocument == COMPRESS_INDEX) {
               // compress index was requested
               try {
-                compressIndex();
+                compactIndex();
               } catch(Exception e) {
                 if(indexCompressionRequested != null) {
                   indexCompressionRequested.setException(e);

Modified: mimir/branches/5.0/mimir-test/src/gate/mimir/test/Scratch.java
===================================================================
--- mimir/branches/5.0/mimir-test/src/gate/mimir/test/Scratch.java      
2014-01-29 17:55:48 UTC (rev 17258)
+++ mimir/branches/5.0/mimir-test/src/gate/mimir/test/Scratch.java      
2014-01-29 18:29:53 UTC (rev 17259)
@@ -81,11 +81,11 @@
 public class Scratch {
 
   public static void main (String[] args) throws Exception {
-//    mainIndexer5(args);
+    mainIndexer5(args);
     
 //     mainSimple(args);
     
-     mainDirectIndexes(args);
+//     mainDirectIndexes(args);
 //    mainBuildDirectIndex(args);
 //    mainQueryIndex(args);
 //    mainRemote(args);
@@ -248,7 +248,7 @@
     Enumeration<? extends ZipEntry> entries = zip.entries();
     
     int copies = 10;
-    boolean compress = false;
+    boolean compress = true;
     ResourceData docRd = 
Gate.getCreoleRegister().get(DocumentImpl.class.getName());
     while(entries.hasMoreElements()) {
       ZipEntry entry = entries.nextElement();

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to