Will this change also help in all kinds of sorting, as i want sorting by title, relavance, popularity, call number, author
Regards, Satya On Thu, Jul 2, 2009 at 12:39 PM, Mason James <[email protected]>wrote: > > On 2009/07/2, at 6:49 PM, satyanarayana holenarsipur wrote: > > Hi Joe, >> >> Thanks for the quick response. >> >> Yes. It is very similar to main search code. I wanted a sorting feature >> very similar to what we have now was the search results page. The sort >> dropdown comes right next to the results table. But I faced a lot of >> problems while doing this. >> >> The search.pl uses 'getRecords' function to get the records, store it and >> pas it to the templates. >> The addbooks.pl uses 'SimpleSearch' function to get the records, store it >> and pass it to the templates. >> >> SimpleSearch has 'offset' as its parameter, but it is only used for >> pagination function. and cannot be used for sorting the result set. >> > > > hiya Satyanarayana > > i too recently made a sorting change to addbooks.pl > by simply giving SimpleSearch() a better query. > > > + my $ti_query = qq|ti,rt,wrdl,r3="$query"|; > + > # find results > - my ( $error, $marcresults, $total_hits ) = SimpleSearch($query, > $results_per_page * ($page - 1), $results_per_page); > + my ( $error, $marcresults, $total_hits ) = SimpleSearch($ti_query, > $results_per_page * ($page - 1), $results_per_page); > > > this cleaner method is adequate for your addbooks.pl sorting needs, surely? > > > -- Regards, Satyanarayana H.S. Development Head (www.osslabs.biz) -- "A small group of determined spirits, with an unquenchable thirst for their mission, can alter the course of history." -Mahatma Gandhi
_______________________________________________ Koha-patches mailing list [email protected] http://lists.koha.org/mailman/listinfo/koha-patches
