Archive for 5月, 2010

 

qgramで全文検索 Tokyo cabinet tyrant

5月 28th, 2010

http://alpha.mixi.co.jp/blog/?p=1112 # tctmgr inform -nl /var/ttserver/auctionItem/auctionItem.tct path: /var/ttserver/auctionItem/auctionItem.tct database type: table additional flags: open bucket number: 131071 alignment: 256 free block pool: 1024 index number: 5 name=bid, type=decimal, rnum=1232262, fsiz=20391168 name=mon, type=decimal, rnum=1232262, fsiz=14535680 name=key, type=lexical, rnum=1232262, fsiz=32897792 name=det, type=qgram, rnum=0, fsiz=131601664 name=pri, type=decimal, rnum=0, fsiz=5216512 unique ID seed: 1232263 inode number: 37617667 modified time: […]

Read full article | コメントは受け付けていません。

Perl メモ

5月 24th, 2010

このまま更新するとまたズレルダロウナ おpreは上手くいったっぽいけど一行Perlが変だ。。。 適当に改行してみる。 $ perl -ne “\$/=\”),(\”; while(){ if( /'([0-9a-z]+)’,'(http[^']+)’,'([^']+)’,'([^']+)’,([0-9]*),([0-9]+),'([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}:[0-9]{2}:[0-9]{2})’/ ){ print \”\$1 \$2 \$5\\n\”; }exit; }” 3 動いたので test.phpを <?php var_dump( $argv ); で $ perl -ne “\$/=\”),(\”; while(){ if( /'([0-9a-z]+)’,'(http[^']+)’,'([^']+)’,'([^']+)’,([0-9]*),([0-9]+),'([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}:[0-9]{2}:[0-9]{2})’/ ){ exec(\”php -f test.php \$1 \$2 \$5\”);}exit;}” string(8) “test.php” [1]=> string(9) “128274767” [2]=> string(53) “http://example.com/128274767″ [3]=> string(1) “2” } とやりたいことが出来た。。。

Read full article | コメントは受け付けていません。