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.34 2008/03/27 12:57:37 jonasw Exp $ + // $Id: Query.pmod,v 1.35 2008/03/28 12:53:28 liin 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:83:   //! Used when searching in the field "any:".   //!   //! @returns   //! An array with three elements:   //! @array   //! @elem Search.ResultSet 0   //! The ResultSet containing the hits.   //! @elem array(string) 1   //! All wanted words in the query. (I.e. not the words that were   //! preceded by minus.) - //! @elem array(string) 2 + //! @elem array(mapping) 2   //! All wanted globs in the query. (I.e. not the globs that were   //! preceded by minus.)   //! @endarray   //!   array(Search.ResultSet|array(string)) execute(Search.Database.Base db,    Search.Grammar.AbstractParser parser,    string query,    Search.RankingProfile ranking,    void|array(string) stop_words,    void|search_order order)
pike.git/lib/modules/Search.pmod/Query.pmod:303:    push(stack->top());    } else {    push(db->get_all_documents());    }    hasPlus = 0;    hasOrdinary = 0;    plusWordGlobs -= ({ "*" });    ordinaryWordGlobs -= ({ "*" });    }    -  glob_words += Array.uniq(plusWordGlobs | ordinaryWordGlobs); +  foreach(Array.uniq(plusWordGlobs || ({}) | +  ordinaryWordGlobs || ({})), string w) +  glob_words += ({ ([ q->field : w]) });       if(hasPlus)    {    int first = 1;    if(sizeof(plusWords))    {    words += plusWords;    push(do_query_and(db, plusWords, ranking));    first = 0;    }