4 WebSession.bootstrap();
8 itempage = CGI.param('itempage');
10 #type,string,location,depth
11 count_meth = 'open-ils.search.biblio.class.count';
13 #type,string,location,depth,limit,offset
14 search_meth = 'open-ils.search.biblio.class';
16 session = WebSession.init_app_session('open-ils.search');
18 type = CGI.param('mr_search_type');
19 string = CGI.param('mr_search_query');
20 location = CGI.param('mr_search_location');
21 depth = CGI.param('mr_search_depth');
23 offset = itempage * pagesize - 1;
26 IF CGI.param('pagesize');
27 pagesize = CGI.param('pagesize');
30 req = session.request(count_meth, type, string, location, depth);
36 IF count > rank_threshold;
37 search_meth = 'open-ils.search.biblio.class.unorded';
40 req = session.request(search_meth, type, string, location, depth, limit, offset);
48 <rss version="2.0" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">
50 <title>Pines Catalogue Search: [% string %] </title>
51 <link>http://http://gapines.org/opensearch.ttk/?target=mr_result&mr_search_type=[% type %]&mr_search_query=[% string %]&itempage=[% itempage %]&mr_search_depth=[% depth %]&mr_search_location=[% location %]</link>
52 <description>Search results for "[% string %]" at gapines.org</description>
53 <language>en-us</language>
54 <copyright>&copy;2004-2005, Georga Public Library Service.</copyright>
55 <openSearch:totalResults>[% count %]</openSearch:totalResults>
56 <openSearch:startIndex>[% offset + 1 %]</openSearch:startIndex>
57 <openSearch:itemsPerPage>[% pagesize %]</openSearch:itemsPerPage>
60 FOREACH mr_id IN list;
61 req = session.request('open-ils.search.biblio.metarecord.mods_slim.retrieve', mr_id);
69 <title>[% mods.title() %]</title>
70 <link>http://gapines.org/opac/?target=record_result&page=0&mrid=[% mr_id %]&hits_per_page=10</link>
72 <b>Author:</b> [% mods.author() %]<br>
73 <b>Subjects:</b>
75 FOREACH sub IN mods.subject();