Hi everyone, OK, a couple of things. First of all, I didn't write SearchMarc.pm, though I am working on a new module called MarcSearch.pm which will do what Chris wants when it's done (I have not committed it yet)--I think Paul wrote SearchMarc.pm. At this point, MarcSearch.pm is just an add-on to Search.pm and replaces all the OPAC subroutines with subs that use the MARC database for retrieving bibids and then sends the list of biblionumbers to the subs that retrieve the rest of the data, etc. Eventually, I would like MarcSearch.pm to contain the subs that retrieve the actual results from the MARC data. For instance, rather than using Koha's title table to retrieve title information for display on the results screen I would like to grab: 245a, b, h, 246a, 295c concatinated as a single string. I have similar ideas for author, etc. Second, I've posted Stephen's Simple Searching Plan document on our wiki at http://66.213.78.60:8585/index.php/SimpleSearch I've made a few comments as well. Joshua On Sat, Mar 06, 2004 at 07:59:05AM -0500, Stephen Hedges wrote:
Chris Cormack said:
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.
Hi, Chris -
As you probably know, Joshua and Owen and I have been thinking a lot about the searching lately. I've attached the latest document we've been passing among ourselves for comment, just so you can see what we are thinking (at this moment anyway -- our thoughts tend to bounce around a lot.)
In general, though, I think a query object is a very, very good idea. Anything we can do to simplify the current searching modules has to be a step in the right direction!
-- Stephen Hedges Skemotah Solutions, USA www.skemotah.com -- shedges@skemotah.com