4 j = ws.bootstrap_client("/pines/conf/bootstrap.conf");
9 IF CGI.param('pagesize');
10 pagesize = CGI.param('pagesize');
13 itempage = CGI.param('itempage');
15 #type,string,location,depth
16 count_meth = 'open-ils.search.biblio.class.count';
18 #type,string,location,depth,limit,offset
19 search_meth = 'open-ils.search.biblio.class';
21 session = ws.init_app_session('open-ils.search');
23 type = CGI.param('mr_search_type');
24 string = CGI.param('mr_search_query');
25 location = CGI.param('mr_search_location');
26 depth = CGI.param('mr_search_depth');
28 offset = itempage * pagesize - 1;
34 req = session.request(count_meth, type, string, location, depth);
35 j = req.wait_complete();
37 count = req.recv().content();
40 IF count > rank_threshold;
41 search_meth = 'open-ils.search.biblio.class.unordered';
44 req = session.request(search_meth, type, string, location, depth, limit, offset);
45 j = req.wait_complete();
47 list = req.recv().content();
52 <rss version="2.0" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">
54 <title>Pines Catalogue Search: [% string %] </title>
55 <link>http://http://gapines.org/opensearch/?target=mr_result&mr_search_type=[% type %]&mr_search_query=[% string %]&itempage=[% itempage %]&mr_search_depth=[% depth %]&mr_search_location=[% location %]</link>
56 <description>Search results for "[% string %]" at gapines.org</description>
57 <language>en-us</language>
58 <copyright>&copy;2004-2005, Georga Public Library Service.</copyright>
59 <openSearch:totalResults>[% count %]</openSearch:totalResults>
60 <openSearch:startIndex>[% offset + 1 %]</openSearch:startIndex>
61 <openSearch:itemsPerPage>[% pagesize %]</openSearch:itemsPerPage>
66 FOREACH mr_id IN mr_list;
67 req = session.request('open-ils.search.biblio.metarecord.mods_slim.retrieve', mr_id.0);
70 mods = req.recv().content();
75 <title>[% mods.title() %]</title>
76 <link>http://gapines.org/opac/?target=record_result&page=0&mrid=[% mr_id.0 %]&hits_per_page=10</link>
78 <b>Author:</b> [% mods.author() %]<br>
79 <b>Subjects:</b>
81 FOREACH sub IN mods.subject();
92 <b>Available:</b> [% mr_id.2 %]