[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-devel] SearchMarc.pm
From: |
Chris Cormack |
Subject: |
[Koha-devel] SearchMarc.pm |
Date: |
Fri Mar 5 20:59:10 2004 |
User-agent: |
Mutt/1.5.5.1i |
Hi All
Especially Joshua. Ive been thinking on starting work on Query.pm our top
level search module.
And im thinking of using Joshua's SearchMarc.pm module as one (if not its
main) backend.
Heres what im thinking
Query.pm creates an object. On creating the kohaquery
object you pass it a string which describes your search. Pat and Steve were
discussing perhaps using a syntax like googles.
Eg something like
my $query=Query::new("title: elephants (author: johnson | author: tonnesen)")
you then can do things like
$num_of_results=$query->count();
my $results=$query->results(-sortby => 'title', -limit=>10, -offset=>'10');
So the Query module does all the hard work, and then all search.pl needs to
do is craft the search string.
So making new searches, or searching new combinations of data should be easy.
Now joshua has written a module SearchMarc.pm which searches the marc tables
to return data, so I was thinking of using Query.pm to parse the
searchstring and construct the appropriate variables to call catalogsearch
in SearchMarc
Good, Bad, stupid idea?
Chris
--
Chris Cormack Programmer
027 4500 789 Katipo Communications Ltd
address@hidden www.katipo.co.nz
- [Koha-devel] SearchMarc.pm,
Chris Cormack <=