pike.git / lib / modules / Search.pmod / Query.pmod

version» Context lines:

pike.git/lib/modules/Search.pmod/Query.pmod:1:   // This file is part of Roxen Search   // Copyright © 2001 Roxen IS. All rights reserved.   // - // $Id: Query.pmod,v 1.24 2002/03/12 15:38:07 js Exp $ + // $Id: Query.pmod,v 1.25 2002/03/25 12:54:32 js Exp $      static function(string,int:string) blobfeeder(Search.Database.Base db, array words)   {    mapping state = mkmapping(words,allocate(sizeof(words)));    mapping(string:mapping(int:string)) blobcache = ([ ]);    return lambda( string word, int foo )    {    return db->get_blob(word, state[word]++, blobcache);    };   }
pike.git/lib/modules/Search.pmod/Query.pmod:80:    Search.Grammar.AbstractParser parser,    string query,    Search.RankingProfile defaultRanking,    array(string)|void stop_words)   {    Search.Grammar.ParseNode q = parser->parse(query);    if (stop_words && sizeof(stop_words)) {    q = Search.Grammar.remove_stop_words(q, stop_words);    }    -  werror("%O\n", q); +     q = Search.Grammar.optimize(q);       if (!q) // The query was a null query    return ({ Search.ResultSet(), ({}) }); // so return an empty resultset       string error = Search.Grammar.validate(q);    if (error)    throw (error);       return class {