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 chris@katipo.co.nz www.katipo.co.nz
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
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
On 2004-03-06 12:59:05 +0000 Stephen Hedges <shedges@skemotah.com> wrote:
[...] I've attached the latest document we've been passing among ourselves for comment [...]
Small suggestion for the future: Including it inline or as a file on the web is easier for readers to reply with comments.
On Tue, Mar 09, 2004 at 12:30:34AM +0000, MJ Ray wrote:
On 2004-03-06 12:59:05 +0000 Stephen Hedges <shedges@skemotah.com> wrote:
[...] I've attached the latest document we've been passing among ourselves for comment [...]
Small suggestion for the future: Including it inline or as a file on the web is easier for readers to reply with comments. It's here:
http://66.213.78.60:8585/index.php/SimpleSearch
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Koha-devel mailing list Koha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/koha-devel
Chris Cormack wrote:
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.
Joshua is right. i'm the author of CVS SearchMarc.pm we did some tests a feww weeks ago to improve it.
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?
Good. I'm working at the moment on SearchMarc.pm itself. My roadmap was the following : 1 modify it to use faster indexes. We already did some tests with Nelsonville. 2 modify it to add "seealso" feature. With see also, you can define in MARC parameters other fields that can be searches when the 1st is asked. For example : author (200$a => also search 701$a, 702$a, 703$a) It's what Joshua speaks about when he says : "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" Those 2 are done & commited a few minuts ago. 3 modify search to add "order by feature". the order must be choosen in a biblio or biblioitem field. 4 add "store query in my session" (through cookie) => to be able to modify the last cookie. 5 add next & previous feature in MARCdetail.pl 6 add "store up to 5 previous queries". 7 modify opac to use marc search & drop "quick search in Librarian interface) The 1st 3 steps are fully compatible with Chris ideas. They are on a lower level. So I propose to work on SearchMarc itself, and Chris or someone else on higher level (including point 4-6 of this mail) I leave Marseille for Belgium tommorow afternoon. I'll be back on wednesday. I won't work on those features until then to avoid working on something that someone else works too) Instead, i think i'll work on some code cleaning in circulation or members module. END NOTE : shouldn't we organize a irc meeting to officially "elect" 2.0 release maintainer & 2.2 release manager ? afaik, we have slef as 2.0RM & me as 2.2RM ? (the 2.0RM could be nominated when official 2.0.0 is released (i still take care of 2.0.0, as promised). That's a question of days : i'm just waiting for polish & chinese translation & some feedbacks on z3950clients. Seems that this points is better) -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org)
A couple of comments to Paul -- (SH) paul POULAIN said:
2 modify it to add "seealso" feature. With see also, you can define in MARC parameters other fields that can be searches when the 1st is asked. For example : author (200$a => also search 701$a, 702$a, 703$a) It's what Joshua speaks about when he says :
"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"
That's not quite what Joshua meant, or at least he wouldn't call it "seealso" (if I may speak for him). Joshua meant that all of those tags and subfields have to be searchable when the user does a title search. In English librarian lingo, "see also" means that if a user searches for "subject_1" there's a "See also" note with a link to "related_subject_2." I think that's actually more like your "thesaurus" capability, isn't it Paul? (I have to admit I don't really understand how the thesaurus works.)
Those 2 are done & commited a few minuts ago. 3 modify search to add "order by feature". the order must be choosen in a biblio or biblioitem field.
And even though Paul already knows this, we have to also handle the "non-filing" characters in MARC titles somehow so that the order-by feature puts "The World Book" in the "W's" and not the "T's." -- Stephen Hedges Skemotah Solutions, USA www.skemotah.com -- shedges@skemotah.com
Stephen Hedges wrote:
A couple of comments to Paul -- (SH)
paul POULAIN said:
2 modify it to add "seealso" feature. With see also, you can define in MARC parameters other fields that can be searches when the 1st is asked. For example : author (200$a => also search 701$a, 702$a, 703$a) It's what Joshua speaks about when he says :
"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"
That's not quite what Joshua meant, or at least he wouldn't call it "seealso" (if I may speak for him). Joshua meant that all of those tags and subfields have to be searchable when the user does a title search. In English librarian lingo, "see also" means that if a user searches for "subject_1" there's a "See also" note with a link to "related_subject_2." I think that's actually more like your "thesaurus" capability, isn't it Paul? (I have to admit I don't really understand how the thesaurus works.)
ok, you're right... i should NOT have called it "seealso". Because it is what Joshua meant. And the 'see also' also refers to links in UNIMARC. so, do you have another name for this feature/field ?
Those 2 are done & commited a few minuts ago. 3 modify search to add "order by feature". the order must be choosen in a biblio or biblioitem field.
And even though Paul already knows this, we have to also handle the "non-filing" characters in MARC titles somehow so that the order-by feature puts "The World Book" in the "W's" and not the "T's."
you're right. I modify french wiki immediatly -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org)
participants (5)
-
Chris Cormack -
Joshua Ferraro -
MJ Ray -
paul POULAIN -
Stephen Hedges