Time |
S |
Nick |
Message |
11:01 |
|
Genji |
hmm.. too energized. think this Zen master guy actually works. Anyway, Koha cvs, care to step me through setting WinCVS up? |
11:12 |
|
Genji |
paul? |
11:16 |
|
Genji |
hmm.. too energized. think this Zen master guy actually works. Anyway, Koha cvs, care to step me through setting WinCVS up? |
11:19 |
|
JYL57_alt |
Hi Genji |
11:19 |
|
JYL57_alt |
Are you using 2.2 already ?! |
11:20 |
|
Genji |
using RC3,, yup. going to CVS update to RC4 soon. |
11:21 |
|
JYL57_alt |
Good |
11:21 |
|
JYL57_alt |
We are cataloguing here with RC4 |
11:21 |
|
Genji |
hows it going? |
11:21 |
|
JYL57_alt |
And have started three weeks of tests... |
11:22 |
|
JYL57_alt |
Do you use 'fines management' ?! |
11:23 |
|
JYL57_alt |
Quite well with english templates ! |
11:24 |
|
Genji |
nope. cause our library install isn't used for anything but cataloguing right now. |
11:24 |
|
JYL57_alt |
Is it a Public Library ?! |
11:27 |
|
Genji |
hmm... kinda. Its a theosophical society library. |
11:28 |
|
JYL57_alt |
Hmm, what kind ?! |
11:31 |
|
JYL57_alt |
Genji, did you understood the 'Issuing Rules' management ? |
11:31 |
|
Genji |
okay, gotta sleep. its 4am here. night. |
11:31 |
|
JYL57_alt |
Ok, good night |
12:41 |
|
kados |
hi paul, owen |
12:41 |
|
paul |
hi joshua & owen |
12:41 |
|
owen |
Hi |
12:42 |
|
kados |
paul did you see bug 878? |
12:42 |
|
kados |
http://bugs.koha.org/cgi-bin/b[…]ow_bug.cgi?id=878 |
12:43 |
|
paul |
no, but now yes ;-) |
12:43 |
|
kados |
I imported the database again on our test server and after running updatadatabase I got the same errors with title and author searches as before |
12:43 |
|
kados |
:-) |
12:43 |
|
owen |
Paul, are you subscribed to the koha-bugs mailing list? |
12:43 |
|
paul |
(yes of course) |
12:44 |
|
paul |
do you mean that it worked before but not after ? |
12:44 |
|
paul |
coz updatedatabase says it did almost nothing |
12:45 |
|
paul |
just 3 fields in 3 tables not related to MARC... |
12:45 |
|
paul |
so :-( |
12:45 |
|
paul |
did you look at marc_subfield_parameters ? |
12:45 |
|
kados |
not closely |
12:45 |
|
kados |
... what am I looking for? |
12:45 |
|
paul |
look at kohafield field |
12:46 |
|
paul |
to see where "biblio.title" is mapped |
12:46 |
|
paul |
(or biblio.author) |
12:47 |
|
paul |
mmm... are you using a RC4 official or a CVS version ? |
12:47 |
|
paul |
cause i made some modifs to Context, that could be related to your problem |
12:47 |
|
kados |
I'm using CVS |
12:47 |
|
kados |
ahh |
12:47 |
|
paul |
but have not been commited |
12:47 |
|
paul |
i commit them immediatly |
12:47 |
|
kados |
cool |
12:48 |
|
paul |
ok, commited |
12:48 |
|
paul |
i'm almost sure it's the origin of your problem. |
12:49 |
|
paul |
(i made some improvements, but seems I commited only half of the stuff) |
12:49 |
|
kados |
cool I'll update |
12:53 |
|
kados |
hmmm, still not working |
12:53 |
|
kados |
https://opac.athenscounty.lib.[…]ha/opac-search.pl |
12:53 |
|
kados |
Q : select distinct m1.bibid from biblio,biblioitems,marc_biblio,marc_word as m1 where biblio.biblionumber=marc_biblio.biblionumber and biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and (m1.word like 'cryptonomicon' and m1.tagsubfield in ('bibl')) order by biblio.title at /usr/local/koha/intranet/modules/C4/SearchMarc.pm line 270., referer: https://opac.athenscounty.lib.[…]ha/opac-search.pl |
12:54 |
|
kados |
the 'bibl' is still the problem, eh? |
12:54 |
|
paul |
yep |
12:55 |
|
paul |
seems Koha can't find the MARC tag connected to "biblio.title" |
12:55 |
|
paul |
and thus think it's a MARC tag |
12:55 |
|
paul |
and cut it to 4 digits (like 200a) |
12:55 |
|
paul |
no idea what it can be due to... |
12:55 |
|
paul |
phone ring |
12:56 |
|
kados |
hmmm, /me looks at MARC links in intranet: |
12:57 |
|
kados |
title 245 a Title |
12:57 |
|
kados |
author 100 a Personal name |
12:57 |
|
kados |
those look fine |
12:58 |
|
paul |
mmm... not cool... |
12:58 |
|
paul |
you have only 1 framework ? |
12:58 |
|
kados |
one framework? |
12:58 |
|
paul |
yep, in Koha 2.2 you can define more than 1 framework for MARC editor |
12:58 |
|
kados |
what's framework? |
12:58 |
|
paul |
to catalog differently a monography, a serial, an old book... |
12:59 |
|
paul |
Koha >> parameters >> biblio frameworks |
12:59 |
|
paul |
you have "default", that is the 2.0 framework imported |
12:59 |
|
paul |
and you can define other frameworks from here |
12:59 |
|
kados |
which template is right: default or css? |
13:00 |
|
paul |
i have really no idea where your problem comes from |
13:00 |
|
paul |
for opac, it's css |
13:00 |
|
paul |
BUT : in librarian interface, the css does not exist, so default is used instead automatically |
13:00 |
|
kados |
we have default framework ... but no code |
13:01 |
|
paul |
as expected |
13:01 |
|
paul |
hello tim |
13:01 |
|
kados |
so how do I fix this problem ? |
13:01 |
|
kados |
do I need to add a code? |
13:01 |
|
paul |
??? |
13:02 |
|
paul |
no, there is no problem |
13:02 |
|
paul |
default framework is the one without code ;-) |
13:02 |
|
kados |
I have Code: Description: Default framework |
13:02 |
|
kados |
nothing in the Code column |
13:02 |
|
paul |
as expected. |
13:02 |
|
kados |
ok |
13:02 |
|
paul |
;-) |
13:02 |
|
kados |
:-) |
13:02 |
|
paul |
i have no idea... |
13:03 |
|
kados |
well our database may be strange because of already having marc_word ... |
13:03 |
|
kados |
it's hybrid between 2.0 and 2.2 |
13:03 |
|
kados |
I wonder if that's where the problem lies |
13:03 |
|
paul |
your problem comes from : |
13:03 |
|
paul |
C4/Biblio.pm |
13:04 |
|
paul |
sub MARCfind_marc_from_kohafield { |
13:04 |
|
paul |
my ( $dbh, $kohafield,$frameworkcode ) = @_; |
13:04 |
|
paul |
return 0, 0 unless $kohafield; |
13:04 |
|
paul |
my $relations = C4::Context->marcfromkohafield; |
13:04 |
|
paul |
return ($relations->{$frameworkcode}->{$kohafield}->[0],$relations->{$frameworkcode}->{$kohafield}->[1]); |
13:04 |
|
paul |
MARCfind_marc_from_kohafield must be this one. |
13:04 |
|
paul |
check what it returns |
13:04 |
|
paul |
it it returns empty values when kohafield=biblio.title or biblio.author |
13:04 |
|
paul |
then you must investigate here |
13:06 |
|
kados |
will this do: |
13:06 |
|
kados |
use Data::Dumper; |
13:06 |
|
kados |
die Dumper $relations->{$frameworkcode}->{$kohafield}->[0],$relations->{$frameworkcode}->{$kohafield}->[1]) |
13:12 |
|
tim |
hi paul |
13:12 |
|
tim |
everyone else |
13:13 |
|
JYL57 |
Hi tim |
13:18 |
|
kados |
msg owen we don't have much money ... but we do have the ability to display ads ... |
13:18 |
|
kados |
oops :-) |
13:18 |
|
kados |
trixy / |
13:24 |
|
tim |
Don't ya hate when that happens kados? |
13:24 |
|
kados |
hehe |
13:25 |
|
paul |
like this /mst kados . |
13:26 |
|
kados |
so how do we turn it off? |
13:26 |
|
kados |
hehe |
13:28 |
|
paul |
ctrl-w on my Ksirc |
13:28 |
|
paul |
dunno for you |
13:29 |
|
kados |
paul what's the best way for me to dump that data out (I can't get Data::Dumper to display anything |
13:29 |
|
paul |
print "xxxx" ;-) |
13:30 |
|
kados |
hehe |
13:31 |
|
kados |
hmmm ... in Biblio.pm I put: |
13:31 |
|
kados |
print "($relations->{$frameworkcode}->{$kohafield}->[0],$relations->{$frameworkcode}->{$kohafield}->[1])"; |
13:31 |
|
kados |
and in the log I get nothing |
13:32 |
|
paul |
warn maybe ? |
13:32 |
|
paul |
warn "xxx" |
13:32 |
|
paul |
prints to stderr |
13:32 |
|
paul |
while print prints to stdout |
13:32 |
|
paul |
and it's stderr that is in errorlog ! |
13:33 |
|
kados |
hmmm still not getting anything |
13:35 |
|
paul |
nothing or an empty line ? |
13:35 |
|
kados |
nothing |
13:35 |
|
kados |
I even tried doing warn "here is the error: \n" |
13:35 |
|
kados |
and I don't get that either |
13:36 |
|
kados |
but it's the right Biblio.pm cause if I mess up the perl I get an error |
13:36 |
|
paul |
so, you're not looking the correct error log ;-) |
13:37 |
|
kados |
hmmm no it's the right log (I can see the exact queries I"m using) |
13:37 |
|
paul |
so ??? |
13:37 |
|
kados |
it's the opac-error_log |
13:38 |
|
kados |
hmmm ... |
13:40 |
|
kados |
nope ... not in any of the logs |
13:40 |
|
kados |
how frustrating! |
13:41 |
|
kados |
is it possible that our frameworkcode table has problems? |
13:42 |
|
kados |
updatedatabase may have ignored some parts of our database because they looked right (even if they are not) |
13:42 |
|
kados |
I don't think I did anything with frameworkcode |
13:44 |
|
kados |
paul can you send me a database snapshot (all the info on what tables, types, fields, etc. should be in the database) so I can check mine |
13:47 |
|
paul |
you can compare the mysql structure of 2.2 with your quite easily |
13:47 |
|
paul |
just check misc/koha.mysql |
13:47 |
|
paul |
it's an uptodate 2.2 structure |
13:48 |
|
paul |
(i updated it just before releasing 2.2.0RC1, and no changes since this release) |
16:06 |
|
kados |
owen still around? |
16:06 |
|
kados |
could you give me some specific examples of new DVDs that aren't showing up? |
16:06 |
|
owen |
yes |
16:07 |
|
owen |
Yeah, let me try... |
16:14 |
|
owen |
http://66.213.78.77/cgi-bin/ko[…]ail.pl?bib=153774 |
16:14 |
|
owen |
That one doesn't come up with a title search |
16:14 |
|
owen |
...in the opac. But it does in the intranet |
16:15 |
|
kados |
ok ... I'll check it out |
16:17 |
|
owen |
Also: http://66.213.78.77/cgi-bin/ko[…]ail.pl?bib=153569 |
16:19 |
|
kados |
ok ... I know what the problem is |
16:19 |
|
kados |
tagsubfield doesn't exist on that item |
16:19 |
|
kados |
so the opac doens't know about it |
16:19 |
|
kados |
I'll check my script to see what's going on |
16:20 |
|
owen |
Can a search be done to pick up all the items affected by this problem? |
16:20 |
|
kados |
yep |
16:20 |
|
owen |
I wonder if it's only AV stuff? |
16:20 |
|
kados |
Nope the Cornwell item is a book |
16:21 |
|
owen |
Oh, right. |
16:21 |
|
kados |
I can fix it pretty easily tonight ... I'll just dump the tag and subfield and import them with some perl magic |
16:21 |
|
kados |
I can't wait till we are running 2.2 |
16:21 |
|
owen |
Ah, magic. Is there anything it can't do? |
16:21 |
|
kados |
:-) |
16:21 |
|
kados |
write itself :-) |
16:22 |
|
kados |
I've got a neat book idea that basically goes like this: |
16:22 |
|
kados |
a long time ago ... |
16:22 |
|
kados |
people discovered nanotechnology |
16:22 |
|
kados |
and used it to assymilate all the other technology |
16:22 |
|
kados |
so all that was left was nanobots |
16:22 |
|
kados |
and people (techies) |
16:23 |
|
kados |
could utter the right phrases to make neat stuff happen |
16:23 |
|
kados |
(hence the mages of old) |
16:23 |
|
kados |
but something happened |
16:23 |
|
kados |
that the techies did not intend |
16:23 |
|
kados |
and the nanobots revolted |
16:24 |
|
kados |
civilization ended ... and the nanobots became Gods |
16:24 |
|
kados |
man served them ... until the nanobots got bored and left |
16:24 |
|
kados |
when the nanobots left there was no technology left either |
16:25 |
|
kados |
and that's where our myths come from |
16:25 |
|
owen |
Pretty good...and there's no evidence because the nanobot revolution ended up depriving humanity of all their trappings of modernity |
16:25 |
|
kados |
yep |
16:25 |
|
owen |
I like it. |
16:26 |
|
kados |
who would use a toaster when you could have nanobots toast your bread for you :-) |
16:26 |
|
owen |
Or build toast right from the matter-hopper! |
16:26 |
|
kados |
hehe |
16:26 |
|
kados |
which looks alot like dust |
16:27 |
|
kados |
and responds to voice commands |
16:27 |
|
owen |
...like "Tea! Earl Grey! Hot!" |
16:27 |
|
kados |
hehe |
16:28 |
|
kados |
who knows ... maybe the nanobots are still around and noone knows how to operate them |
16:28 |
|
kados |
maybe the nanobot revolution was the act of killing the techies off |
16:29 |
|
kados |
so they could be Gods |
16:29 |
|
kados |
hehe |
16:29 |
|
owen |
Hence the old idea that if you know something's true name you had control over it |
16:29 |
|
kados |
hehe yep |
16:30 |
|
kados |
maybe the nanobots are still around and if we knew the right words we could control them |
16:30 |
|
kados |
a kind of "back door command console" |
16:30 |
|
kados |
overide their AI |
16:30 |
|
kados |
or their free will :-) |
16:30 |
|
kados |
:-) |
16:33 |
|
owen |
Now you've just got to figure out how to make that either into a ripping yarn or a very profitable religion. |
16:34 |
|
kados |
hehe |
16:34 |
|
kados |
well the sequel is about modern nanobots discovering the truth about the past nanobots |
16:36 |
|
kados |
hey owen ... could you take a look at the latest manifestation of my cinci templates? |
16:36 |
|
kados |
opac.athenscounty.lib.oh.us |
16:37 |
|
owen |
Sure |
16:37 |
|
kados |
tell me what you think (everything's basically done except the items in red font) |
16:37 |
|
rach |
howdy |
16:37 |
|
kados |
hi rach |
16:37 |
|
kados |
mind you only the keyword search works cause of the BIblio.pm prob |
16:38 |
|
kados |
cool |
16:38 |
|
kados |
I'd like to come up with a master template that utilized css to the max |
16:38 |
|
kados |
then templating would be writing css rather than html |
16:39 |
|
owen |
Mine should be pretty close, but there's still a lot you have to do to the HTML to get some of the more complex layouts (3 columns, etc) |
16:39 |
|
kados |
I want to do everything with includes |
16:39 |
|
kados |
hmmm ... my site uses css for the 3column layout ;-) |
16:40 |
|
kados |
so includes: header, masthead, gatewaybar, maincontent, rightcontent, leftcontent, footer |
16:41 |
|
owen |
sure, but there has to be a framework of objects to hang the layout on. |
16:41 |
|
owen |
And some layouts need more divs than others |
16:41 |
|
kados |
ooh I've got to go |
16:44 |
|
rach |
Owen I agree - I suspect that if you want to do more than change the colours (and lets face it don't we always :-) then you're in playing with the HTML |
16:45 |
|
rach |
we usually do the includes around the other way - so the content is on the page, and the template is included around it |
16:46 |
|
rach |
we've found (in 18months when you've forgotten whatever your cunning plan at the time was) that it's easier to start with the page/content, and hunt up the template includes, than the other way around |
16:49 |
|
owen |
It's very hard to get started with a design that's too heavily dependent on includes. |
16:49 |
|
owen |
I often have to grab a snapshot of the source code from the browser and work backwards |
16:54 |
|
rach |
yeah it is hard |
16:54 |
|
rach |
we did get into the habit of putting comments in the includes |
16:54 |
|
rach |
so that when you looked at the compliled page, you could see when the includes started and finished |
16:55 |
|
rach |
like <!--header include--> |
16:55 |
|
rach |
<!--end of header include |
16:55 |
|
rach |
<!--title inclued--> |
16:55 |
|
rach |
etc |
16:55 |
|
rach |
we found it made it a bit easier to work out what was going on |
16:56 |
|
rach |
and then which include you needed to change :-) |
18:27 |
|
pate |
hiya, long time no see |
18:27 |
|
chris |
heya pate :) |
18:27 |
|
owen |
pate! wb! |
18:28 |
|
pate |
how're things in the wide world of Koha? |
18:28 |
|
pate |
hiya owen |
18:32 |
|
owen |
The wide world of Koha moves too slow! We need more developers! |
18:32 |
|
owen |
...who want to add the things /i/ want! |
18:33 |
|
pate |
owen, some things never change ;) |
18:33 |
|
owen |
:) |
18:42 |
|
chris |
cya later pate |
18:47 |
|
rach |
hey that's cool |
18:47 |
|
rach |
pat dropping in :-) |
18:51 |
|
owen |
It was a whirlwind tour |
18:51 |
|
kados |
hey guys |
18:59 |
|
JYL57 |
hello |
19:00 |
|
JYL57 |
could someone remind me how to find who has borrowed which item ?! |
19:01 |
|
JYL57 |
I think I read something about that some times ago |
19:03 |
|
JYL57 |
Ok, I've my answer ! |
19:05 |
|
JYL57 |
Bye |
19:15 |
|
kados |
It'd be nice to be able to change the opac template FROM THE OPAC ... owen did I understand that your're working on that? |
19:16 |
|
owen |
Well, I'm building an alternate stylesheet so that users can switch them on their own, through their browser (which isn't always easy) |
19:16 |
|
kados |
ahh |
19:16 |
|
kados |
sortof like zen garden |
19:16 |
|
owen |
But it would be easy to build a 'large print' version of the opac and offer it that way. You could also build a stylesheet switching widget into the site itself. |
19:17 |
|
kados |
yea large print, kids, PDA, ... |
19:18 |
|
owen |
I'm sure there are better examples, but if you point Firefox at http://www.zeldman.com you can see some alternate stylesheets listed under the View > Page Style menu |
19:20 |
|
owen |
Just because this is possible doesn't mean it's easy for the user to accomplish, though, which is the disadvantage. |
19:21 |
|
chris |
thats why i reckon having a little button like the change language might be easier? |
19:21 |
|
kados |
yea ... owen I can't find the "view" link on that page |
19:21 |
|
kados |
:-) |
19:22 |
|
owen |
It's in the browser's file menu |
19:23 |
|
kados |
ahh I see |
19:23 |
|
kados |
neat |
19:24 |
|
kados |
owen what's involved in generating a page like oplin's firstsearch? |
19:25 |
|
kados |
where the content is aggrogated from multiple sources? |
19:25 |
|
owen |
You mean like building our own? |
19:25 |
|
kados |
yep |
19:25 |
|
kados |
it seems like it would n't be too hard |
19:26 |
|
owen |
I suppose they must be querying those various resources for returns in some alternate format like XML and then aggregating it and outputing it all together. |
19:26 |
|
kados |
if we had a perl script that grabbed content and pulled it into a single document ... |
19:26 |
|
owen |
But you'd have to figure out how to grab information for a lot of different databases, work with a lot of different vendors. |
19:26 |
|
kados |
I guess ideally oplin would have some way of querying their database api and getting xml instead of html |
19:27 |
|
kados |
hmmm, well I |
19:27 |
|
kados |
was just thinking about three or four |
19:27 |
|
kados |
our opac, oplin first search, google scholar, google itself |
19:28 |
|
kados |
we could have checkboxes in advanced search for each of those |
19:28 |
|
kados |
just a thought |
19:28 |
|
owen |
If first search could return xml you'd be halfway there |
19:28 |
|
owen |
Because they'd do a lot of aggregating for us |
19:29 |
|
kados |
so are they doing the page update with javascript ? |
19:29 |
|
kados |
I like the fact that I don't have to wait for the whole result set |
19:31 |
|
owen |
I don't know...are you sure you're not just seeing the progressive download by the browser? |
19:32 |
|
kados |
hmm, maybe ... if that's the case then their search is blindingly fast |
19:32 |
|
kados |
I get the impression that it's displaying things as they are resolved |
19:32 |
|
kados |
but that might not be the way it works |
19:34 |
|
kados |
webfeat is the engine the're using |
19:34 |
|
owen |
I don't see anything in the source that suggests that, but I could be wrong. |
23:52 |
|
Genji |
hiya all. |
23:52 |
|
Genji |
question, how do i set up a cvsclient for koha? |
23:55 |
|
chris |
for windows? |
23:55 |
|
chris |
if so, no idea |
23:56 |
|
chris |
sourceforge probably has some documentation |
23:57 |
|
Genji |
whats the unix path, host name, and cvsroot? |
23:58 |
|
chris |
http://sourceforge.net/cvs/?group_id=16466 |
01:27 |
|
kados |
Genji if you're running redhat use 'yum install cvs' if debian 'apt-get install cvs' |
02:53 |
|
kados |
anyone about? |
02:53 |
|
kados |
I've got a really strange problem on the production machine |
02:54 |
|
kados |
as far as I know everything has been running fine ... then I noticed that our test opac machines were having problems with title and author searches |
02:54 |
|
kados |
now the production machine is seemingly having the same problems |
02:54 |
|
kados |
in the opac error log I have: |
02:54 |
|
kados |
DBD::mysql::st execute failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by biblio.biblionumber order by title' at line 1 at /usr/local/koha/intranet/modules/C4/Search.pm line 1237. |
02:59 |
|
chris |
hmm |
03:00 |
|
chris |
line 1237 |
03:00 |
|
chris |
whats that in ur module |
03:00 |
|
kados |
$sth->execute(@bind); |
03:01 |
|
chris |
what version of koha |
03:01 |
|
kados |
it's a hybrid between 2.0 (intranet) and 2.2 (opac) |
03:01 |
|
chris |
can u look at the version string of the module? |
03:02 |
|
chris |
ah crap |
03:02 |
|
kados |
wait a sec ... now it's working ... |
03:02 |
|
chris |
it doesnt have a correct version number set |
03:02 |
|
kados |
I don't get it ... I didn't change a thing |
03:02 |
|
kados |
what doesn't? |
03:03 |
|
chris |
the module |
03:03 |
|
chris |
its nothing to do with the problem its just annoying |
03:03 |
|
kados |
ahh |
03:03 |
|
chris |
ill change that |
03:04 |
|
chris |
you could whack a |
03:04 |
|
kados |
so I have this script that I run periodically to concat tag and subfieldid to tagsubfield in marc_word |
03:04 |
|
chris |
warn ($query); |
03:04 |
|
chris |
before the execute |
03:04 |
|
kados |
will do |
03:07 |
|
kados |
ahh I know what's going on |
03:07 |
|
kados |
we've got the replecated machine trying to catch up still |
03:07 |
|
kados |
I just ran that script so it's taking a while for it to finish updating |
03:08 |
|
kados |
stupid me |
03:11 |
|
chris |
thanks for answering the random koha query on the list |
03:25 |
|
kados |
np |
03:26 |
|
kados |
random is right ? I thought at first it might be a prank (or even spam ;-)) |
03:26 |
|
kados |
I'm thinking: is koha that big now that it's showing up in spam? |
03:26 |
|
kados |
hehe |
03:27 |
|
chris |
:) |
03:47 |
|
kados |
chris I'd like to find the total number of distinct words in marc_word ... |
03:47 |
|
kados |
select distinct count(*) from marc_word; |
03:48 |
|
kados |
gives the same number as without the distinct |
03:48 |
|
kados |
select count(*) from marc_word where distinct word; |
03:49 |
|
kados |
something like this would be ideal |
04:03 |
|
chris |
select count(disctinct(word)) from marc_word; |
04:03 |
|
chris |
distinct even |
04:04 |
|
kados |
hehe |
04:04 |
|
kados |
yea it's been running for the last four minutes ;-) |
04:05 |
|
kados |
5,000,000 rows |
04:11 |
|
kados |
wow ... I can't believe it ... |
04:11 |
|
kados |
mysql> select count( distinct word ) from marc_word; |
04:11 |
|
kados |
+------------------------+ |
04:11 |
|
kados |
| count( distinct word ) | |
04:11 |
|
kados |
+------------------------+ |
04:11 |
|
kados |
| 266259 | |
04:11 |
|
kados |
+------------------------+ |
04:11 |
|
kados |
1 row in set (9 min 16.73 sec) |
04:11 |
|
kados |
we need to move to a distinct marc_word ... our query times would be nil |
04:11 |
|
kados |
that's insane! |
04:12 |
|
chris |
sorry? |
04:14 |
|
kados |
ok ... we've got 5,000,000 rows in marc_word |
04:14 |
|
kados |
that's where our queries go to in 2.2 |
04:14 |
|
chris |
right and marc_word has stuff from titles, authors ... what else? |
04:14 |
|
kados |
each word in the database appears there |
04:15 |
|
kados |
basically everything that we want to search on |
04:15 |
|
kados |
there are maybe a dozen marc tags |
04:15 |
|
chris |
right that makes sense |
04:15 |
|
kados |
but there are only 250,000 distinct words |
04:15 |
|
chris |
how many words are there in the enlgish language in common usage? |
04:15 |
|
kados |
no idea |
04:15 |
|
chris |
cant be much more than that |
04:15 |
|
kados |
nope ... |
04:16 |
|
kados |
a distinct marc_word table would be really fast |
04:16 |
|
chris |
so initially query that |
04:16 |
|
chris |
to see if the word exists |
04:16 |
|
kados |
it would have every bibid assiciated wtih the word in an array of hashes |
04:16 |
|
kados |
bibid => tagsubfield |
04:17 |
|
kados |
so you would go select from marc_word where word like "term" |
04:17 |
|
kados |
then you would parse out the result based on the tagsubfield |
04:17 |
|
chris |
the trick is storing the bibid's in the database |
04:18 |
|
kados |
yea and deleting is tough too |
04:18 |
|
kados |
but we only do that a little bit |
04:18 |
|
kados |
compard to the ammout of queries |
04:18 |
|
kados |
say 20 times per day max |
04:19 |
|
chris |
i dont know how you would store it |
04:20 |
|
kados |
hmmm |
04:20 |
|
kados |
well if you're stumped I'm probably in trouble :-) |
04:20 |
|
chris |
i dont think you can |
04:20 |
|
chris |
all you could do |
04:20 |
|
kados |
what about just an array then |
04:20 |
|
kados |
a comma seperated value |
04:21 |
|
chris |
yeah, then u have the overhead of parsing that |
04:21 |
|
kados |
where evens are tagsubfield and odds are bibids |
04:21 |
|
chris |
i think you could win a lot of speed |
04:21 |
|
chris |
by just doing ur like query over a distinct list |
04:21 |
|
kados |
what about storing the whole thing as a single string |
04:21 |
|
chris |
eew |
04:21 |
|
kados |
with no spaces |
04:22 |
|
chris |
that would be horrible to maintain in terms of modifying |
04:22 |
|
kados |
and just grabbing chars after the tagsubfield (since all the values are fixed) |
04:23 |
|
chris |
how fast is the average search query now? |
04:23 |
|
kados |
it's just a simple s/245a102134// |
04:23 |
|
kados |
depends on what you search on |
04:23 |
|
chris |
so how would this work |
04:23 |
|
kados |
it ranges from .5 sec to 8-10 or so |
04:23 |
|
chris |
say chris appears 50000 times in marc_word |
04:24 |
|
kados |
ahh |
04:24 |
|
kados |
hehe that's a real problem :-) |
04:24 |
|
chris |
:) |
04:24 |
|
kados |
I'd say you're way too popular |
04:24 |
|
kados |
(or that you wrote yourself into the database ;-) |
04:24 |
|
chris |
heres something to try |
04:25 |
|
chris |
select count(*) as wordcount,word from marc_word group by word order by wordcount desc |
04:26 |
|
chris |
hmm |
04:26 |
|
kados |
should I limit that at all? |
04:26 |
|
chris |
and put a limit 10 say |
04:26 |
|
kados |
ok |
04:26 |
|
kados |
here we go :-) |
04:26 |
|
chris |
should give us the top 10 most popular words |
04:27 |
|
kados |
our marc_word file was about twice as big before we removed the stop words |
04:27 |
|
chris |
i bet lots of them are numbers |
04:27 |
|
kados |
-> limit 0,10; |
04:27 |
|
kados |
+-----------+----------+ |
04:27 |
|
kados |
| wordcount | word | |
04:27 |
|
kados |
+-----------+----------+ |
04:27 |
|
kados |
| 115424 | / | |
04:27 |
|
kados |
| 53966 | ; | |
04:27 |
|
kados |
| 45281 | s | |
04:27 |
|
kados |
| 42311 | Books | |
04:27 |
|
kados |
| 21336 | AF | |
04:27 |
|
kados |
| 20567 | Press | |
04:27 |
|
kados |
| 18292 | Includes | |
04:27 |
|
kados |
| 17568 | E | |
04:27 |
|
kados |
| 16473 | & | |
04:27 |
|
kados |
| 15831 | index | |
04:27 |
|
kados |
+-----------+----------+ |
04:27 |
|
kados |
10 rows in set (19.61 sec) |
04:27 |
|
kados |
mysql> |
04:27 |
|
kados |
so don't search on Books |
04:27 |
|
chris |
or / |
04:27 |
|
chris |
:) |
04:28 |
|
kados |
:-) |
04:29 |
|
kados |
hmmm, well it seems like we could get rid of / ; & |
04:29 |
|
kados |
not s or E tho |
04:29 |
|
kados |
unless we don't care about 'ses |
04:29 |
|
kados |
or 's's |
04:29 |
|
kados |
hehe that's a common americanism |
04:29 |
|
chris |
:) |
04:30 |
|
kados |
| 15496 | JNF | |
04:30 |
|
kados |
| 15366 | pa | |
04:30 |
|
kados |
| 14869 | book | |
04:30 |
|
kados |
| 14705 | J | |
04:30 |
|
kados |
| 14427 | new | |
04:30 |
|
kados |
| 14216 | life | |
04:30 |
|
kados |
| 13949 | M | |
04:30 |
|
kados |
| 12978 | Video | |
04:30 |
|
kados |
| 12971 | John | |
04:30 |
|
kados |
| 12962 | 2004 | |
04:30 |
|
kados |
| 12649 | American | |
04:30 |
|
kados |
| 12522 | Home | |
04:30 |
|
kados |
| 11886 | Fiction | |
04:30 |
|
kados |
| 11396 | illustrated | |
04:30 |
|
kados |
| 11202 | p | |
04:30 |
|
kados |
| 10710 | stories | |
04:30 |
|
kados |
| 10459 | 0 | |
04:30 |
|
kados |
| 10396 | World | |
04:30 |
|
kados |
| 10388 | Women | |
04:30 |
|
kados |
| 10242 | his | |
04:30 |
|
kados |
so that's a real problem eh? |
04:30 |
|
kados |
there must be some way to optimize it though |
04:31 |
|
chris |
well doing an exact search is fast i imagine |
04:31 |
|
kados |
two small queries are better than one big onw, no? |
04:31 |
|
chris |
try this |
04:32 |
|
chris |
select count(*) from marc_word where word='Women'; |
04:32 |
|
chris |
vs |
04:32 |
|
kados |
10388 | |
04:32 |
|
chris |
select count(*) from marc_word where word like 'Women%'; |
04:32 |
|
chris |
how many seconds ? |
04:32 |
|
kados |
.05 |
04:33 |
|
kados |
.04 (but it's in memory) |
04:33 |
|
kados |
world: |
04:33 |
|
kados |
.05 |
04:33 |
|
kados |
hmmm these are all running quite fast |
04:34 |
|
chris |
maybe we need to get an actual query to try |
04:44 |
|
kados |
chris what would be the fastest possible way to print an array as text to apache? (without html::template formatting? |
04:45 |
|
chris |
foreach my $value (@array){ |
04:45 |
|
chris |
print $value; |
04:45 |
|
chris |
} |
04:46 |
|
chris |
or print "$value<br>"; |
04:46 |
|
chris |
if you wanted them show one per line |
04:46 |
|
chris |
is that what you meant? |
04:47 |
|
kados |
well when I try that I get an internal server error |
04:47 |
|
chris |
ahh |
04:47 |
|
chris |
well |
04:47 |
|
chris |
if its the first thing u print ulll need to do something like |
04:47 |
|
chris |
use CGI; |
04:48 |
|
chris |
my $cgi = new CGI; |
04:48 |
|
chris |
print $cgi->header(); |
04:48 |
|
kados |
ahh |
04:48 |
|
chris |
then the foreach |
04:48 |
|
chris |
you could just do |
04:48 |
|
chris |
print "Content text/html\n\n"; |
04:48 |
|
chris |
i think thats the syntax |
04:49 |
|
kados |
sweet it works |
04:49 |
|
chris |
but i forget, and $cgi->header does it nicer |
04:52 |
|
chris |
hi paul |
04:57 |
|
kados |
wow ... /me is still up when paul gets up :-) |
04:57 |
|
kados |
it must be late |
04:57 |
|
kados |
er ... early |
04:57 |
|
chris |
:) |
04:57 |
|
kados |
2:57am |
04:57 |
|
kados |
it's koha related |
04:57 |
|
chris |
cool |
04:57 |
|
kados |
he'll tell more when he gets it done |
04:57 |
|
kados |
it might also be stupid |
04:58 |
|
kados |
hehe |
04:58 |
|
chris |
hehe |
05:01 |
|
chris |
my latest project isnt koha related |
05:01 |
|
chris |
and im pretty sure its stupid |
05:01 |
|
chris |
but its fun |
05:05 |
|
chris |
http://www.justobey.com/ |
05:10 |
|
chris |
if you have any pictures to add, ur welcome to register and upload them :) |
05:45 |
|
paul |
hello kados |
05:45 |
|
paul |
& chris too |
06:00 |
|
paul |
kados are u still awake ? |
06:26 |
|
kados |
paul yes but not for long ;-) |
06:26 |
|
paul |
for sure ! |
06:26 |
|
kados |
hehe |
06:26 |
|
paul |
did you solve your problem ? |
06:26 |
|
kados |
not yet |
06:26 |
|
paul |
(the "bibl" one) |
06:26 |
|
kados |
nope |
06:26 |
|
paul |
i closed the bug for item deletion, as i'm sure it's the same problem |
06:27 |
|
paul |
and i'm sure also it's related to C4::Context modifs |
06:27 |
|
paul |
ok, go to bed, we will see ths evening (for me) |
06:27 |
|
kados |
sounds good |
06:27 |
|
kados |
zzz |
06:27 |
|
paul |
i've checked twice everything has been commited |
06:27 |
|
paul |
fixing bug 836 now |