You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2011/01/05 18:13:30 UTC

svn commit: r1055536 - in /lucene/dev/branches/docvalues/lucene/contrib: benchmark/res-docvalues.txt misc/src/test/org/apache/lucene/index/TestIndexSplitter.java

Author: simonw
Date: Wed Jan  5 17:13:30 2011
New Revision: 1055536

URL: http://svn.apache.org/viewvc?rev=1055536&view=rev
Log:
merged TestIndexSplitter

Added:
    lucene/dev/branches/docvalues/lucene/contrib/benchmark/res-docvalues.txt   (with props)
Modified:
    lucene/dev/branches/docvalues/lucene/contrib/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java

Added: lucene/dev/branches/docvalues/lucene/contrib/benchmark/res-docvalues.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/benchmark/res-docvalues.txt?rev=1055536&view=auto
==============================================================================
--- lucene/dev/branches/docvalues/lucene/contrib/benchmark/res-docvalues.txt (added)
+++ lucene/dev/branches/docvalues/lucene/contrib/benchmark/res-docvalues.txt Wed Jan  5 17:13:30 2011
@@ -0,0 +1,286 @@
+Using org.apache.lucene.store.NIOFSDirectory
+Using TaskType: perf.values.DocValuesSearchTask
+open commit=single
+found commit=delsingle
+found commit=delmulti
+found commit=multi
+found commit=single
+reader=DirectoryReader(_2:C100000->_0 )
+
+HITS q=body:state s=null tot=66586
+  0 doc=31683 score=0.6216621
+  1 doc=6465 score=0.52749777
+  2 doc=89702 score=0.5102744
+  3 doc=34617 score=0.49732968
+  4 doc=37939 score=0.49732968
+  5 doc=40168 score=0.49732968
+  6 doc=91695 score=0.49732968
+  7 doc=88878 score=0.4865276
+  8 doc=7515 score=0.45682645
+  9 doc=33356 score=0.44300243
+
+HITS q=body:unit* s=null tot=64020
+  0 doc=0 score=1.0
+  1 doc=1 score=1.0
+  2 doc=2 score=1.0
+  3 doc=3 score=1.0
+  4 doc=4 score=1.0
+  5 doc=5 score=1.0
+  6 doc=6 score=1.0
+  7 doc=7 score=1.0
+  8 doc=8 score=1.0
+  9 doc=9 score=1.0
+  166 expanded terms
+
+HITS q=body:un*d s=null tot=14719
+  0 doc=0 score=1.0
+  1 doc=1 score=1.0
+  2 doc=3 score=1.0
+  3 doc=4 score=1.0
+  4 doc=6 score=1.0
+  5 doc=7 score=1.0
+  6 doc=8 score=1.0
+  7 doc=14 score=1.0
+  8 doc=15 score=1.0
+  9 doc=16 score=1.0
+  283 expanded terms
+
+HITS q=body:united~0.6 s=null tot=1517
+  0 doc=94559 score=0.21607591
+  1 doc=10514 score=0.2085325
+  2 doc=9180 score=0.15598921
+  3 doc=98900 score=0.15598921
+  4 doc=29180 score=0.13552018
+  5 doc=45805 score=0.13174331
+  6 doc=94568 score=0.122231
+  7 doc=11270 score=0.117062256
+  8 doc=39076 score=0.115145996
+  9 doc=36171 score=0.100617126
+  50 expanded terms
+
+HITS q=body:united~0.7 s=null tot=15
+  0 doc=10514 score=0.27043164
+  1 doc=9180 score=0.20229185
+  2 doc=98900 score=0.20229185
+  3 doc=57708 score=0.121375114
+  4 doc=75166 score=0.11443355
+  5 doc=18073 score=0.096111685
+  6 doc=31928 score=0.096111685
+  7 doc=36408 score=0.08450989
+  8 doc=11020 score=0.07592164
+  9 doc=21473 score=0.06760791
+  5 expanded terms
+
+HITS q=body:unit body:state s=null tot=71542
+  0 doc=31683 score=0.89471126
+  1 doc=89702 score=0.71672213
+  2 doc=34617 score=0.71576905
+  3 doc=37939 score=0.71576905
+  4 doc=40168 score=0.71576905
+  5 doc=91695 score=0.71576905
+  6 doc=88878 score=0.7002223
+  7 doc=89820 score=0.6991013
+  8 doc=55403 score=0.6326564
+  9 doc=55404 score=0.6326564
+
+HITS q=+body:unit +body:state s=null tot=58425
+  0 doc=31683 score=0.89471126
+  1 doc=89702 score=0.71672213
+  2 doc=34617 score=0.71576905
+  3 doc=37939 score=0.71576905
+  4 doc=40168 score=0.71576905
+  5 doc=91695 score=0.71576905
+  6 doc=88878 score=0.7002223
+  7 doc=89820 score=0.6991013
+  8 doc=55403 score=0.6326564
+  9 doc=55404 score=0.6326564
+
+HITS q=body:"unit state" s=null tot=54506
+  0 doc=31683 score=1.2651248
+  1 doc=34617 score=1.0120999
+  2 doc=37939 score=1.0120999
+  3 doc=40168 score=1.0120999
+  4 doc=91695 score=1.0120999
+  5 doc=88878 score=0.99011683
+  6 doc=89702 score=0.99011683
+  7 doc=55403 score=0.8945784
+  8 doc=55404 score=0.8945784
+  9 doc=32555 score=0.8855874
+checksum=68434440
+ns by query/coll:
+  q=body:state s=null h=66586
+    t=0
+      4541285 c=462018
+      2521923 c=462018
+      2915687 c=462018
+      2059937 c=462018
+      2004176 c=462018
+      2727423 c=462018
+      2623427 c=462018
+      1978686 c=462018
+      1968359 c=462018
+      2014628 c=462018
+      1960483 c=462018
+      11575285 c=462018
+      2009970 c=462018
+      1958026 c=462018
+      2020333 c=462018
+      2004770 c=462018
+      2036261 c=462018
+      1988123 c=462018
+      3135525 c=462018
+      1957758 c=462018 **
+  q=body:unit* s=null h=64020
+    t=0
+      4643808 c=45
+      3172345 c=45
+      7674774 c=45
+      16807995 c=45
+      10921573 c=45
+      3437976 c=45
+      3452401 c=45
+      2387546 c=45
+      2235433 c=45
+      2259292 c=45
+      2284227 c=45
+      2946973 c=45
+      2262370 c=45
+      2202474 c=45
+      2200461 c=45
+      2209527 c=45
+      2251586 c=45
+      2215512 c=45
+      2237371 c=45
+      2165564 c=45 **
+  q=body:un*d s=null h=14719
+    t=0
+      284963221 c=74
+      2881482 c=74
+      3413104 c=74
+      2619053 c=74
+      8096969 c=74
+      26424168 c=74
+      14795044 c=74
+      2062666 c=74
+      2059954 c=74
+      2806232 c=74
+      1981718 c=74
+      19105887 c=74
+      1927838 c=74
+      1967447 c=74
+      1947438 c=74
+      1948304 c=74
+      1939775 c=74
+      2001071 c=74
+      16598882 c=74
+      1835379 c=74 **
+  q=body:united~0.6 s=null h=1517
+    t=0
+      103826471 c=469223
+      555717303 c=469223
+      1080376099 c=469223
+      220017651 c=469223
+      61706415 c=469223
+      282379259 c=469223
+      39197097 c=469223
+      36378629 c=469223
+      38290239 c=469223
+      36514786 c=469223
+      135201864 c=469223
+      57833228 c=469223
+      34226735 c=469223
+      34172475 c=469223 **
+      34190557 c=469223
+      34488326 c=469223
+      36086069 c=469223
+      34802333 c=469223
+      36801995 c=469223
+      34283121 c=469223
+  q=body:united~0.7 s=null h=15
+    t=0
+      32861609 c=370370
+      28054777 c=370370
+      92952691 c=370370
+      16755846 c=370370
+      20157696 c=370370
+      9575311 c=370370
+      10457266 c=370370
+      9222218 c=370370
+      9193130 c=370370
+      9226210 c=370370
+      12061566 c=370370
+      9734193 c=370370
+      8858844 c=370370
+      8915963 c=370370
+      8948563 c=370370
+      8970609 c=370370
+      8944755 c=370370
+      8847053 c=370370
+      8946026 c=370370
+      8815974 c=370370 **
+  q=body:unit body:state s=null h=71542
+    t=0
+      10110094 c=615309
+      6409071 c=615309
+      10406489 c=615309
+      8814748 c=615309
+      6617722 c=615309
+      7808115 c=615309
+      6153731 c=615309
+      6230989 c=615309
+      6156351 c=615309
+      6165167 c=615309
+      8189550 c=615309
+      6154614 c=615309
+      6142561 c=615309
+      6136166 c=615309 **
+      6204193 c=615309
+      6850011 c=615309
+      6172851 c=615309
+      6154971 c=615309
+      6159624 c=615309
+      6146062 c=615309
+  q=+body:unit +body:state s=null h=58425
+    t=0
+      61650331 c=615309
+      9063414 c=615309
+      13550026 c=615309
+      9021896 c=615309
+      7951216 c=615309
+      9605724 c=615309
+      7246070 c=615309
+      7297794 c=615309
+      7264085 c=615309
+      7236206 c=615309
+      9566315 c=615309
+      7237453 c=615309
+      7199994 c=615309
+      7162410 c=615309
+      7183931 c=615309
+      7427852 c=615309
+      7149552 c=615309
+      7629251 c=615309
+      7087746 c=615309 **
+      7166387 c=615309
+  q=body:"unit state" s=null h=54506
+    t=0
+      94524392 c=558044
+      31604183 c=558044
+      26322724 c=558044
+      23596029 c=558044
+      31573744 c=558044
+      31345234 c=558044
+      23844613 c=558044
+      23516075 c=558044
+      23907187 c=558044
+      23513933 c=558044
+      31254583 c=558044
+      23532671 c=558044
+      23500264 c=558044
+      23418273 c=558044
+      23520715 c=558044
+      23457058 c=558044
+      23545091 c=558044
+      23398826 c=558044 **
+      23683312 c=558044
+      23467857 c=558044

Modified: lucene/dev/branches/docvalues/lucene/contrib/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java?rev=1055536&r1=1055535&r2=1055536&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/lucene/contrib/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java (original)
+++ lucene/dev/branches/docvalues/lucene/contrib/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java Wed Jan  5 17:13:30 2011
@@ -21,7 +21,7 @@ import java.io.File;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
-import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
 
@@ -33,7 +33,7 @@ public class TestIndexSplitter extends L
     File destDir = new File(TEMP_DIR, "testfilesplitterdest");
     _TestUtil.rmDir(destDir);
     destDir.mkdirs();
-    Directory fsDir = newFSDirectory(dir);
+    FSDirectory fsDir = FSDirectory.open(dir);
 
     LogMergePolicy mergePolicy = new LogByteSizeMergePolicy();
     mergePolicy.setNoCFSRatio(1);
@@ -58,19 +58,14 @@ public class TestIndexSplitter extends L
       iw.addDocument(doc);
     }
     iw.commit();
-    IndexReader iwReader = iw.getReader();
-    assertEquals(3, iwReader.getSequentialSubReaders().length);
-    iwReader.close();
+    assertEquals(3, iw.getReader().getSequentialSubReaders().length);
     iw.close();
     // we should have 2 segments now
     IndexSplitter is = new IndexSplitter(dir);
     String splitSegName = is.infos.info(1).name;
     is.split(destDir, new String[] {splitSegName});
-    Directory fsDirDest = newFSDirectory(destDir);
-    IndexReader r = IndexReader.open(fsDirDest, true);
+    IndexReader r = IndexReader.open(FSDirectory.open(destDir), true);
     assertEquals(50, r.maxDoc());
-    r.close();
-    fsDirDest.close();
     
     // now test cmdline
     File destDir2 = new File(TEMP_DIR, "testfilesplitterdest2");
@@ -78,17 +73,12 @@ public class TestIndexSplitter extends L
     destDir2.mkdirs();
     IndexSplitter.main(new String[] {dir.getAbsolutePath(), destDir2.getAbsolutePath(), splitSegName});
     assertEquals(3, destDir2.listFiles().length);
-    Directory fsDirDest2 = newFSDirectory(destDir2);
-    r = IndexReader.open(fsDirDest2, true);
+    r = IndexReader.open(FSDirectory.open(destDir2), true);
     assertEquals(50, r.maxDoc());
-    r.close();
-    fsDirDest2.close();
     
     // now remove the copied segment from src
     IndexSplitter.main(new String[] {dir.getAbsolutePath(), "-d", splitSegName});
-    r = IndexReader.open(fsDir, true);
+    r = IndexReader.open(FSDirectory.open(dir), true);
     assertEquals(2, r.getSequentialSubReaders().length);
-    r.close();
-    fsDir.close();
   }
 }