Branch: Tag:

2001-05-31

2001-05-31 01:08:50 by Johan Schön <js@opera.com>

Now uses the abstract Database class. Also some other cleanupwork

Rev: lib/modules/Search.pmod/Indexer.pmod:1.5
Rev: lib/modules/Search.pmod/Query.pmod:1.5
Rev: lib/modules/Search.pmod/RankingProfile.pike:1.4

1:   mapping blob_done=([]);    - static function(int:string) blobfeeder(Search.Database.MySQL db, array word_ids) + static function(int:string) blobfeeder(Search.Database.Base db, array word_ids)   {    mapping state = mkmapping(word_ids,allocate(sizeof(word_ids)));    return lambda( int word )
10:   }       - Search.ResultSet do_query_or(Search.Database.MySQL db, + Search.ResultSet do_query_or(Search.Database.Base db,    array(string) words,    Search.RankingProfile ranking)   {
22:    blobfeeder(db, word_ids));   }    - Search.ResultSet do_query_and(Search.Database.MySQL db, + Search.ResultSet do_query_and(Search.Database.Base db,    array(string) words,    Search.RankingProfile ranking)   {
34:    blobfeeder(db, word_ids));   }    - Search.ResultSet do_query_phrase(Search.Database.MySQL db, + Search.ResultSet do_query_phrase(Search.Database.Base db,    array(string) words,    Search.RankingProfile ranking)   {
47:         /* Test stuff */ - Search.ResultSet test_query(Search.Database.MySQL db, array(string) words) + Search.ResultSet test_query(Search.Database.Base db, array(string) words)   {    array(int) field_ranking=allocate(66);    field_ranking[0]=17;
64:    blobfeeder(db, map(words,hash) ));   }    - _WhiteFish.ResultSet test_query2(Search.Database.MySQL db, array(string) words) + _WhiteFish.ResultSet test_query2(Search.Database.Base db, array(string) words)   {    array(int) field_ranking=allocate(66);    field_ranking[0]=17;