Monday, August 07, 2006

Tsk tsk AOL..

For Postgres users (not the best way of doing things, but it works):

cat user-ct-test-collection-*.txt | grep -v "AnonID" | grep -v "\\\." > silly.txt
createdb aol
psql aol
aol=# create table tmp (anonid varchar(16), query varchar(1024), querytime varchar(32),
itemrank varchar(5), clickurl varchar(1024));
aol=# copy tmp from '/Users/josh/AOL-data/silly.txt';
aol=# create table aol (anonid integer, query varchar(1024), querytime timestamp,
itemrank integer, clickurl varchar(1024));
aol=# insert into aol select anonid::integer, query, querytime::timestamp, case when
itemrank='' then NULL else itemrank::integer end, clickurl from tmp;
aol=# create index aol_id on aol (anonid);

1 Comments:

Anonymous Anonymous said...

I use postgresql too here at aol.zanoza.lv.

Now I'm indexing it with tsearch2.

2:13 PM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home