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

version» Context lines:

pike.git/lib/modules/Search.pmod/Query.pmod:68:   //! @param defaultRanking   //! Used when searching in the field "any:".   Search.ResultSet execute(Search.Database.Base db,    Search.Grammar.AbstractParser parser,    string query,    Search.RankingProfile defaultRanking)   {       Search.Grammar.ParseNode q = parser->parse(query);    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);       werror("Search.Query.execute:\n%s\n", q->print());       return class {    static Search.RankingProfile defaultRanking;    static Search.Database.Base db;