Branch: Tag:

2008-03-28

2008-03-28 12:53:28 by Tobias Liin <liin@roxen.com>

execute() now returns the globs in the search query as an array of mappings: field->glob

Rev: lib/modules/Search.pmod/Query.pmod:1.35

3:   // 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)
90:   //! @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
310:    ordinaryWordGlobs -= ({ "*" });    }    -  glob_words += Array.uniq(plusWordGlobs | ordinaryWordGlobs); +  foreach(Array.uniq(plusWordGlobs || ({}) | +  ordinaryWordGlobs || ({})), string w) +  glob_words += ({ ([ q->field : w]) });       if(hasPlus)    {