Time  Nick     Message
12:09 kados    hi everyone
12:10 kados    thanks for fixing those bugs paul
12:10 kados    our title and author search are working now
12:10 paul     hello joshua
12:10 paul     nice
12:11 kados    here is a link to "Koha Suggest" :-) :
12:11 kados    https://opac.athenscounty.lib.oh.us/
12:11 kados    it's still an infant :-)
12:12 kados    it only works for single words sofar
12:12 kados    but I've got plans for it
12:13 kados    hehe ... type a partial word in the search box
12:13 paul     & clic "start search" ?
12:14 kados    no... you need javascript enabled
12:14 paul     ok, i understand now.
12:14 kados    it should offer suggestions just like "Google Suggest"
12:14 kados    :-)
12:14 paul     it's just that there are only few words in the db for instance ;-)
12:15 kados    well 260,000 or so english words
12:15 kados    :-)
12:15 paul     ...
12:15 kados    I'm working on a version that uses soundex
12:15 paul     if i type "medi", (thinking medium), nothing appear
12:15 paul     konqueror test. will try FF
12:16 kados    right now it only shows words that are in our marc_word table
12:16 kados    (I did a select distinct from marc_word to build the table)
12:16 paul     if i type "harr" (thinking harry), nothing happends too
12:16 kados    BTW paul: we have 5,000,000 entries in marc_word ... and only 260,000 distinct entries
12:17 kados    strange ... I get some suggestions for harr
12:17 paul     yep, good news : that means the marc_words table will be 260 000 entries long...
12:17 kados    great!
12:17 kados    but some words appear 10,000 times or more
12:17 paul     (not exactly, as it will have to have 1 different line for each tag/subfield/word)
12:17 kados    ahh
12:18 kados    you still don't get suggestions for harr paul?
12:18 paul     yes, i get : just need to wait 2-3 seconds.
12:19 kados    right ...
12:19 paul     (quite slow. is it a internet pb ?)
12:19 kados    I'll need to optimize things a bit
12:19 paul     this is a killing feature.
12:19 paul     really !
12:19 kados    hehe wait till I get soundex going ;-)
12:19 kados    it's good for patron searches too
12:19 paul     & does not work on konqueror
12:20 kados    :-(
12:20 kados    do you get any javascript errors?
12:55 jmlongo  hey... this feature is indeed a killing one!
12:56 jmlongo  I've just tested it with mozilla...
12:56 jmlongo  a little slow... but great
12:56 kados    yea it's pretty slow
12:57 kados    I'm sure there's a better way to optimize it but I haven't taken a look yet
13:00 jmlongo  and you can see how many results you're gonna have....  sweet! :)
17:00 kados    hi everyone
17:00 kados    spellcheck is running now but I'm not really happy with how it works:
17:00 chris    dont you ever sleep kados?
17:01 kados    https://opac.athenscounty.lib.oh.us/cgi-bin/koha/opac-main.pl
17:01 kados    not lately ;-)
17:01 kados    the soundex in mysql isn't as good as I'd hoped ... and it's pretty slow
17:01 chris    i was quite happy how my test was working
17:02 chris    but i wasnt using the marc tables
17:02 kados    or maybe my query is wrong
17:02 kados    SELECT word,count FROM word WHERE strcmp(soundex(word), soundex(?)) = 0 order by soundex(word) limit 0,20
17:02 kados    what were you using chris?
17:02 chris    biblio.title
17:02 kados    I made a table that has one instance of every word in marc_word
17:02 chris    do a search
17:02 kados    ahh
17:02 chris    if you get no results
17:02 chris    do a soundex against biblio.title
17:02 chris    and suggest some alternatives
17:03 kados    cool ... I like it ...
17:03 kados    I need to tweak this data quite a bit
17:03 chris    i only had it working for title .. just as a proof of concept really
17:03 kados    we've got lots of bogus entries that I can't think would be useful
17:03 kados    but you never know
17:03 chris    right thats screenshots done for martin
17:04 kados    screenshot of what?
17:04 kados    who's martin?
17:04 kados    ;-)
17:04 chris    :)
17:04 chris    mail on the koha and koha-devel list
17:04 kados    ahh
17:04 chris    martin longo
17:04 chris    and screenshots of issuing/printing slips
17:20 chris    hi angela
17:22 chris    whoops
20:21 kados    chris around?
20:21 chris    yep
20:21 kados    I"m trying to figure out how opac-search.pl and opac-searchresults.pl interact
20:21 chris    afaik opac-search.pl just prints the advance search page
20:22 chris    and opac-searchresults does the search and prints the resutls
20:22 kados    I've tried to create a new template variable for opac-searchresults.tmpl that is an array of all the 'value's of the search
20:22 kados    so that can be displayed at the top of the screen (searchdesc isn't really that pretty)
20:23 chris    k
20:23 kados    the strange thing is that I never see opac-searchresults.pl at the top of the page
20:23 kados    I get something like this:
20:23 kados    https://opac.athenscounty.lib.oh.us/cgi-bin/koha/opac-search.pl?op=do_search&type=opac&marclist=&and_or=and&excluding=&operator=contains&value=cryptonomicon
20:23 kados    as the results page url
20:23 chris    hmm maybe paul has rewritten it
20:24 chris    so that opac-search does both
20:24 kados    hmmm ...
20:24 kados    that would explain it ;-)
20:24 kados    huh ... I removed opac-searchresults and it still works hehe
20:25 kados    that's a pretty good indication
20:25 kados    that it's not needed :-)
20:25 chris    im of 2 opinions with that
20:26 chris    actually i guess i dont mind as long as its still using 2 separate templates
20:26 kados    I'm pretty sure it is
20:28 kados    so in opac-search.pl I've got:
20:28 kados    my @values = $query->param('value');
20:28 kados    my $valuearray = \@values;
20:28 kados    $template->param(VALUES => $valuearray);
20:28 kados    and ...
20:29 kados    in opac-searchresults.tmpl I've got:
20:29 kados    <!-- TMPL_LOOP NAME="VALUES" -->
20:29 kados          <!-- TMPL_VAR NAME="value" -->
20:29 kados            <!-- /TMPL_LOOP -->
20:29 kados    am I missing something?
20:29 chris    yep
20:30 kados    I guess I should just skip the $valuearray ref and just use \@value in the template param
20:30 chris    tmpl_loop wants a ref to an array of hashes
20:30 kados    ok ... lemme try
20:30 chris    ure giving it a ref to an array
20:31 kados    my @values = ('value' => $query->param('value'),)
20:31 kados    how's that?
20:31 chris    hmmm
20:32 chris    really u need to build a hash, then push that hash into the array
20:32 kados    ok ... lemme try again ;-)
20:32 chris    well a ref to it
20:32 chris    thats pretty close actually
20:32 chris    my @values = \('value' => $query->param('value'),)
20:33 chris    hmm nope
20:33 chris    that wont work
20:34 chris    actually its probably just easier to do
20:34 chris    my $value=$query->param('value');
20:35 chris    $tmpl_obj->param(value => $value);
20:35 chris    and not bother with the loop
20:35 kados    but there are multiple values for most searchs
20:35 chris    yep
20:35 kados    ahh I see
20:36 chris    they arent all gonna be called value tho are they
20:36 kados    hmmm, I guess I thought they were
20:36 chris    there must be some way that koha knows if its a title search or a keyword or an author
20:36 kados    ahh you're right ... it's value=neal+stephenson
20:37 kados    there's that too
20:39 chris    basically loops are good if you have lots of items of the same structure
20:39 chris    eg search results
20:40 chris    the you give it an array of search results, each of which is a ref to a hash
20:40 chris    which all have the same structure
20:40 kados    right
20:40 chris    but essentially with the search criteria
20:40 kados    I did that with my opac-detail.pl modifs
20:40 kados    with a foreach loop
20:41 chris    we have 1 hash worth of data
20:41 kados    so it's not worth it
20:41 chris    yeah
20:41 kados    I've got it working now
20:41 chris    it saves typing
20:41 kados    the value variable is passed to the template fine with a space inbetween each value
20:41 chris    but is perhaps an unnessecary obfusctication
20:41 kados    now I'm going to start inserting that value into a table for each successful search
20:42 chris    cool
20:42 kados    actaully I want to insert it regardless --
20:42 chris    yep and just set a switch if its successful
20:42 kados    yep
20:42 kados    this is exciting!
20:42 kados    :-)
20:46 kados    create table searchterms (terms varchar(255) NOT NULL default '', success int(1) NOT NULL default '0', resultcount bigint(20) NOT NULL default '0', KEY xxterms(terms), KEY xsuccess(success), KEY xresultcount(resultcount));
20:47 kados    that should do it eh? do we need to keep track of anything else?
20:48 chris    we could be tricky
20:48 kados    actually i guess we don't even need success ... resultcount =0 means no success
20:48 chris    yep
20:48 chris    we could store the ipaddress
20:48 kados    hehe good idea
20:48 chris    then u could see what opac machine is used the most
20:48 kados    yep ...
20:49 kados    how do I delete a column?
20:49 kados    alter table?
20:49 chris    yep
21:08 kados    ok it's working ... all searches are being logged
21:08 kados    is there some way to consolidate the searches so that searches for the same phrase only show up once?
21:08 kados    in the database
21:08 chris    yep
21:09 chris    altho you lose the ipnumber bit then
21:09 kados    hmmm ... that's right .. .nevermind
21:09 chris    you can do a select .. if it exists, update, if it doenst insert
21:09 kados    I'll just use a seperate table and update it every hour or so
21:09 chris    yeah that would be better
21:09 kados    I didn't do the ip thingy yet (just put one value in )
21:10 kados    is there an easy way to get that?
21:10 kados    that you know of?
21:10 chris    yep using cgi
21:11 chris    assuming $cgi is an object of type CGIl
21:11 chris    CGI; even
21:11 kados    :-)
21:11 chris    then my $ip=$cgi->remote_host();
21:13 kados    sweet it's working!
21:16 kados    damn ... it broke
21:16 kados    hehe
21:24 kados    it'd be kind of cool to have a central datbase for all koha servers to connect to and store this data ;-)
21:24 kados    we could get a world-wide list going
21:24 kados    hehe
21:24 kados    organized by language perhaps
21:24 chris    that would be kinda cool
21:30 kados    chris I'm getting a
21:30 kados    DBI connect('suggest:66.213.78.69','auth',...) failed: Can't connect to MySQL server on '66.213.78.69' (113) at /usr/local/koha/opac/cgi-bin/opac-search.pl line 86
21:30 kados    and I did a
21:30 kados    grant all privileges on *.* to auth@"host78-077.athenscounty.lib.oh.us" identified by
21:30 kados    I used the IP address for that host too
21:31 kados    any other reason you can think of for why that's failing?
21:31 chris    whats the db table say?
21:31 chris    mysql -uroot -ppassword mysql
21:31 chris    select * from db;
21:31 chris    whats the host there say?
21:31 chris    if its localhost
21:31 kados    strange it's not showing that user
21:32 chris    that'd do it
21:32 chris    select * from user;
21:32 chris    is it in there?
21:32 kados    yea it's in user
21:33 kados    so db is used for remote connections?
21:33 chris    no, thats for allowing access to dbs
21:33 chris    you can have a user that can connect to mysql
21:33 chris    but has no rights in any dbs
21:33 chris    which i think youve accidentally set up :)
21:34 kados    strange since that 's the same user I'm using on the localhost and it's working fine
21:34 chris    hmm
21:34 chris    i dont know much about grant syntax
21:34 chris    did you do a mysqladmin reload
21:34 kados    yep
21:35 chris    i always just insert rows into the user and db tables
21:35 kados    I seem to remember a skip_networking somewhere in the conf file
21:35 chris    cos i started before the grant command existed
21:35 kados    but I can't find the conf file anywhere :-)
21:35 chris     /etc/mysql/my.conf
21:35 chris    usually
21:35 kados    right
21:36 kados    that's just got
21:36 kados    [mysqld]
21:36 kados    datadir=/var/lib/mysql
21:36 kados    socket=/var/lib/mysql/mysql.sock
21:36 kados    [mysql.server]
21:36 kados    user=mysql
21:36 kados    basedir=/var/lib
21:36 kados    [safe_mysqld]
21:36 kados    err-log=/var/log/mysqld.log
21:36 kados    pid-file=/var/run/mysqld/mysqld.pid
21:36 chris    this is ur production machine?
21:36 chris    didnt u tweak the conf on it?
21:36 kados    nope this is the new machine
21:37 chris    ahh
21:37 kados    it's running fedora core 3
21:37 chris    heres a trick
21:37 chris    from a machine other than it
21:38 chris    telnet address 3306
21:38 chris    that should at least tell ya if its listening on the network
21:38 chris    or even
21:38 chris    telnet localhost 3306
21:39 kados    Connected to localhost.localdomain (127.0.0.1).
21:39 kados    Escape character is '^]'.
21:39 kados    NHost 'localhost.localdomain' is not allowed to connect to this MySQL serverConnection closed by foreign host.
21:39 kados    so it's listening eh?
21:39 kados    hmmm ...
21:39 chris    yep so thats not the problem
21:41 kados    hmmm actually from another host I get:
21:41 kados    koha:/build/koha/opac# telnet 66.213.78.69 3306
21:41 kados    Trying 66.213.78.69...
21:41 kados    telnet: Unable to connect to remote host: No route to host
21:41 kados    so maybe that is the problem
21:41 chris    firewall
21:42 kados    ahh
21:42 kados    that must be it
21:42 chris    can u just poke a hole in it for 3306 ?
21:42 chris    from certain ips, would be even better
21:44 kados    yep that was it
21:44 kados    yea I just wanted to test it -- my iptables isn't that good yet
21:44 chris    :)
21:44 kados    I'll write the rule now
21:44 chris    do you use shorewall?
21:44 kados    no ...
21:44 chris    sometime when u have some free time might be worth having a read
21:44 kados    cool
21:45 kados    iptables made easy
21:45 chris    it makes manipulating iptables a lot more pleasant
21:45 kados    hehe
21:46 kados    it's working:
21:46 kados    | neal stephenson |           4 | 66.213.78.0  |
21:46 kados    | neal stephenson |           8 | 66.213.78.0  |
21:46 kados    | neal stephenson |           8 | 69.58.13.236 |
21:46 kados    | neal gaiman     |           0 | 69.58.13.236 |
21:46 chris    cool
04:13 kados    chris around?
04:14 kados    I'm trying to get a timestamp in the database too ... but I can't find a cgi timestamp
04:17 kados    ahh I see ... timestamp is handled by mysql
09:49 paulAway ca s'en va et ca revient...