Ignore:
Timestamp:
01/21/11 13:21:57 (13 years ago)
Author:
nanardon
Message:
  • add 'fuzzy search' type search
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/trunk/web/lib/Sophie/Controller/Search.pm

    r201 r327  
    4545 
    4646    for ($c->req->param('type')) { 
     47        /^fuzzyname$/ and do { 
     48            $c->stash->{sargs} = [ {}, $c->req->param('search') ]; 
     49            $c->visit('/search/rpm/fuzzy_rpc', [ $searchspec, $c->req->param('search') || 
     50                    undef ]); 
     51            last; 
     52        }; 
    4753        /^byname$/ and do { 
    4854            $c->stash->{sargs} = [ {}, $c->req->param('search') ]; 
     
    249255                    : ()), 
    250256                ($searchspec->{pkgid} 
    251                     ? { pkgid => $searchspec->{pkgid} } 
     257                    ? { pkgid => { IN => $searchspec->{pkgid} } } 
    252258                    : ()), 
    253259            ], 
Note: See TracChangeset for help on using the changeset viewer.