Branch: Tag:

2001-08-07

2001-08-07 14:33:50 by David Norlin <norlin@roxen.com>

Added stop word removal (but not activated it).

Rev: lib/modules/Search.pmod/Grammar.pmod/module.pmod:1.10
Rev: lib/modules/Search.pmod/Query.pmod:1.19

1:   // This file is part of Roxen Search   // Copyright © 2001 Roxen IS. All rights reserved.   // - // $Id: Query.pmod,v 1.18 2001/07/05 00:47:58 nilsson Exp $ + // $Id: Query.pmod,v 1.19 2001/08/07 14:33:33 norlin Exp $      static function(string,int:string) blobfeeder(Search.Database.Base db, array words)   {
81:   array(Search.ResultSet|array(string)) execute(Search.Database.Base db,    Search.Grammar.AbstractParser parser,    string query, -  Search.RankingProfile defaultRanking) +  Search.RankingProfile defaultRanking, +  array(string)|void stop_words)   {    Search.Grammar.ParseNode q = parser->parse(query); -  +  if (stop_words && sizeof(stop_words)) { +  werror ("Query BEFORE stop word removal:\n%O\n", q->print()); +  q = Search.Grammar.remove_stop_words(q, stop_words); +  werror ("Query AFTER stop word removal:\n%O\n", q->print()); +  }       q = Search.Grammar.optimize(q);