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.20 2001/08/08 14:42:02 norlin Exp $ + // $Id: Query.pmod,v 1.21 2001/08/09 14:49:01 norlin Exp $      static function(string,int:string) blobfeeder(Search.Database.Base db, array words)   {    mapping state = mkmapping(words,allocate(sizeof(words)));    return lambda( string word, int foo )    {    return db->get_blob(word, state[word]++);    };   }   
pike.git/lib/modules/Search.pmod/Query.pmod:185:       if (q->field != "any") {    ranking = specialRanking;    int fieldID = db->get_field_id(q->field, 1);    if (!fieldID && q->field != "body") {    // There was no such field, so we push an empty ResultSet !    push(Search.ResultSet());    break;    }    ranking->field_ranking = allocate(65); -  -  ranking->field_ranking[fieldID] = defaultRanking->field_ranking[fieldID]; -  // ranking->field_ranking[fieldID] = 1; +  ranking->field_ranking[fieldID] = 1;    }       int hasPlus = sizeof(q->plusWords) || sizeof(q->plusPhrases);    int hasOrdinary = sizeof(q->words) || sizeof(q->phrases);    int hasMinus = sizeof(q->minusWords) || sizeof(q->minusPhrases);    if (hasPlus) {    int first = 1;    if (sizeof(q->plusWords)) {    words += q->plusWords;    push(do_query_and(db, q->plusWords, ranking));