Revision: 17258
          http://sourceforge.net/p/gate/code/17258
Author:   valyt
Date:     2014-01-29 17:55:48 +0000 (Wed, 29 Jan 2014)
Log Message:
-----------
Simple direct indexes seem to work (or at least produce results without causing 
exceptions).

Compacted ones seem to not work. Further investigation required...

Modified Paths:
--------------
    mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java
    
mimir/branches/5.0/mimir-core/src/gate/mimir/index/mg4j/zipcollection/DocumentCollection.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:24:33 UTC (rev 17257)
+++ mimir/branches/5.0/mimir-core/src/gate/mimir/index/AtomicIndex.java 
2014-01-29 17:55:48 UTC (rev 17258)
@@ -510,7 +510,7 @@
       List<MG4JIndex> subIndexes){
     
     if(subIndexes == null || subIndexes.size() == 0) return null;
-    if(subIndexes.size() == 1) return subIndexes.get(0).invertedIndex;
+    if(subIndexes.size() == 1) return subIndexes.get(0).directIndex;
     
     // prepare the lexical cluster
     Index[] indexes = new Index[subIndexes.size()];

Modified: 
mimir/branches/5.0/mimir-core/src/gate/mimir/index/mg4j/zipcollection/DocumentCollection.java
===================================================================
--- 
mimir/branches/5.0/mimir-core/src/gate/mimir/index/mg4j/zipcollection/DocumentCollection.java
       2014-01-29 17:24:33 UTC (rev 17257)
+++ 
mimir/branches/5.0/mimir-core/src/gate/mimir/index/mg4j/zipcollection/DocumentCollection.java
       2014-01-29 17:55:48 UTC (rev 17258)
@@ -213,7 +213,7 @@
      * file but they cannot be read from the file. To account for this, we 
keep 
      * them in memory, in the {@link #inputBuffer} structure.
      */
-    protected static final int INPUT_BUFFER_SIZE = 10;
+    protected static final int INPUT_BUFFER_SIZE = 100;
     
     
     /**

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:24:33 UTC (rev 17257)
+++ mimir/branches/5.0/mimir-test/src/gate/mimir/test/Scratch.java      
2014-01-29 17:55:48 UTC (rev 17258)
@@ -248,7 +248,7 @@
     Enumeration<? extends ZipEntry> entries = zip.entries();
     
     int copies = 10;
-    boolean compress = true;
+    boolean compress = false;
     ResourceData docRd = 
Gate.getCreoleRegister().get(DocumentImpl.class.getName());
     while(entries.hasMoreElements()) {
       ZipEntry entry = entries.nextElement();
@@ -509,8 +509,7 @@
     
     TermsQuery query = null;
     
-//    query = new DocumentTermsQuery("root", IndexType.TOKENS, 
-//      true, true, DocumentTermsQuery.NO_LIMIT, 0);
+//    query = new DocumentTermsQuery("root", IndexType.TOKENS, true, true, 0);
 //    printTermQuery(query, qEngine);
 //    System.out.println("\n=======================================");
 //    query = new DocumentTermsQuery("root", IndexType.TOKENS, 
@@ -571,7 +570,7 @@
     long start = System.currentTimeMillis();
     TermsResultSet res = query.execute(qEngine);
     for(int  i = 0; i < res.termStrings.length; i++) {
-      System.out.print(res.termStrings[i] + "\"\t");
+      System.out.print("\"" + res.termStrings[i] + "\"\t");
       if(res.termLengths != null) {
         System.out.print("len:" + res.termLengths[i] + "\t");
       }

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