Branch: Tag:

2001-06-01

2001-06-01 09:13:39 by David Norlin <norlin@roxen.com>

Added some debug code. Fixed a typo.

Rev: lib/modules/Search.pmod/Query.pmod:1.8

15:    Search.RankingProfile ranking)   {    array(int) word_ids=map(Array.uniq(words), db->hash_word); -  return _WhiteFish.do_query_or(word_ids, +  Search.ResultSet result = +  _WhiteFish.do_query_or(word_ids,    ranking->field_ranking,    ranking->proximity_ranking,    ranking->cutoff,    blobfeeder(db, word_ids)); -  +  werror("do_query_or(%{ %O %}) => %d hits\n", words, result->size()); +  return result;   }      Search.ResultSet do_query_and(Search.Database.Base db,
27:    Search.RankingProfile ranking)   {    array(int) word_ids=map(Array.uniq(words), db->hash_word); -  return _WhiteFish.do_query_and(word_ids, +  Search.ResultSet result = +  _WhiteFish.do_query_and(word_ids,    ranking->field_ranking,    ranking->proximity_ranking,    ranking->cutoff,    blobfeeder(db, word_ids)); -  +  werror("do_query_and(%{ %O %}) => %d hits\n", words, result->size()); +  return result;   }      Search.ResultSet do_query_phrase(Search.Database.Base db,
39:    Search.RankingProfile ranking)   {    array(int) word_ids=map(words, db->hash_word); -  return _WhiteFish.do_query_phrase(word_ids, +  Search.ResultSet result = +  _WhiteFish.do_query_phrase(word_ids,    ranking->field_ranking,    // ranking->cutoff,    blobfeeder(db, word_ids)); -  +  werror("do_query_phrase(%{ %O %}) => %d hits\n", words, result->size()); +  return result;   }      //! @param query
63:    if (error)    throw (error);    +  werror("Search.Query.execute:\n%s\n", q->print()); +     return class {    static Search.RankingProfile defaultRanking;    static Search.Database.Base db;
179:    if (hasOrdinary) {    int first = 1;    if (sizeof(q->words)) { -  push(do_query_and(db, q->words, ranking)); +  push(do_query_or(db, q->words, ranking));    first = 0;    }    foreach (q->phrases, array(string) ph) {