Changeset 2005
- Timestamp:
- 12/18/07 18:50:29 (5 months ago)
- Files:
-
- Swishetest/trunk/t/050-C020-largeindex.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Swishetest/trunk/t/050-C020-largeindex.t
r1970 r2005 12 12 13 13 BEGIN { 14 exit(0) unless $ENV{TEST_HUGE_INDEX}; 14 unless ($ENV{TEST_HUGE_INDEX}) { 15 print STDERR "$0: not running huge index test, set TEST_HUGE_INDEX=1 to enable\n"; 16 exit(0); 17 } 15 18 use File::Path qw(mkpath); 16 19 mkpath( ["blib/index"], 0, 0755); … … 21 24 #"./make_collection -min_words=10000 -max_words=10000 -num_files=1000", # this makes 38M index, 40MB prop 22 25 #"./make_collection -min_words=100000 -max_words=100000 -num_files=1000", # this makes 325MB index, 392MB props 23 "./make_collection -min_words=100000 -max_words=100000 -num_files=10000", # this makes 26 "./make_collection -min_words=100000 -max_words=100000 -num_files=10000", # this makes ~3.1gb+2.5gb or so 24 27 "blib/index/$base.index", 25 28 "", # default config … … 27 30 ); 28 31 32 # the real test here is if you get an error indexing above :) 33 29 34 cmp_ok( scalar(keys(%out)), '>', 2, "Indexing output" ); 30 cmp_ok( $out{unique}, '==', 252983, 'unique words indexed' ); 31 cmp_ok( $out{properties}, '==', 5, 'num properties' ); 32 cmp_ok( $out{files}, '==', 2, 'files indexed' ); 33 cmp_ok( $out{bytes}, '==', 2896130, 'bytes indexed' ); 34 cmp_ok( $out{words}, '==', 280381, 'total words indexed' ); 35 36 #cmp_ok( $out{unique}, '==', 252983, 'unique words indexed' ); 37 #cmp_ok( $out{properties}, '==', 5, 'num properties' ); 38 #cmp_ok( $out{files}, '==', 2, 'files indexed' ); 39 #cmp_ok( $out{bytes}, '==', 2896130, 'bytes indexed' ); 40 #cmp_ok( $out{words}, '==', 280381, 'total words indexed' ); 35 41 36 42 DoSearch::open_index( "blib/index/$base.index" ); 37 43 my @rows = DoSearch::do_search( "blib/index/$base.index", "swishe OR test"); 38 44 DoSearch::close_index( "blib/index/$base.index" ); 39 cmp_ok(scalar(@rows), ' ==', 2, "num results from 'swishe OR test'")45 cmp_ok(scalar(@rows), '>', 2, "num results from 'swishe OR test'") 40 46 }; 41 47
