← Previous day | Today | Next day → | Search | Index
All times shown according to UTC.
Time | Nick | Message |
---|---|---|
12:09 | kados | hi everyone |
12:10 | thanks for fixing those bugs paul | |
12:10 | our title and author search are working now | |
12:10 | paul | hello joshua |
12:10 | nice | |
12:11 | kados | here is a link to "Koha Suggest" :-) : |
12:11 | https://opac.athenscounty.lib.oh.us/ | |
12:11 | it's still an infant :-) | |
12:12 | it only works for single words sofar | |
12:12 | but I've got plans for it | |
12:13 | 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 | :-) | |
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 | :-) | |
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 | konqueror test. will try FF | |
12:16 | kados | right now it only shows words that are in our marc_word table |
12:16 | (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 | 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 | 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 | 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 | really ! | |
12:19 | kados | hehe wait till I get soundex going ;-) |
12:19 | it's good for patron searches too | |
12:19 | paul | & does not work on konqueror |
12:20 | kados | :-( |
12:20 | do you get any javascript errors? | |
12:55 | jmlongo | hey... this feature is indeed a killing one! |
12:56 | I've just tested it with mozilla... | |
12:56 | a little slow... but great | |
12:56 | kados | yea it's pretty slow |
12:57 | 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 | 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.[…]koha/opac-main.pl |
17:01 | not lately ;-) | |
17:01 | 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 | but i wasnt using the marc tables | |
17:02 | kados | or maybe my query is wrong |
17:02 | SELECT word,count FROM word WHERE strcmp(soundex(word), soundex(?)) = 0 order by soundex(word) limit 0,20 | |
17:02 | 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 | do a soundex against biblio.title | |
17:02 | and suggest some alternatives | |
17:03 | kados | cool ... I like it ... |
17:03 | 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 | but you never know | |
17:03 | chris | right thats screenshots done for martin |
17:04 | kados | screenshot of what? |
17:04 | who's martin? | |
17:04 | ;-) | |
17:04 | chris | :) |
17:04 | mail on the koha and koha-devel list | |
17:04 | kados | ahh |
17:04 | chris | martin longo |
17:04 | and screenshots of issuing/printing slips | |
17:20 | hi angela | |
17:22 | 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 | 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 | 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 | I get something like this: | |
20:23 | https://opac.athenscounty.lib.[…]lue=cryptonomicon | |
20:23 | as the results page url | |
20:23 | chris | hmm maybe paul has rewritten it |
20:24 | so that opac-search does both | |
20:24 | kados | hmmm ... |
20:24 | that would explain it ;-) | |
20:24 | huh ... I removed opac-searchresults and it still works hehe | |
20:25 | that's a pretty good indication | |
20:25 | that it's not needed :-) | |
20:25 | chris | im of 2 opinions with that |
20:26 | 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 | so in opac-search.pl I've got: | |
20:28 | my @values = $query->param('value'); | |
20:28 | my $valuearray = \@values; | |
20:28 | $template->param(VALUES => $valuearray); | |
20:28 | and ... | |
20:29 | in opac-searchresults.tmpl I've got: | |
20:29 | <!-- TMPL_LOOP NAME="VALUES" --> | |
20:29 | <!-- TMPL_VAR NAME="value" --> | |
20:29 | <!-- /TMPL_LOOP --> | |
20:29 | 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 | how's that? | |
20:31 | chris | hmmm |
20:32 | 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 | thats pretty close actually | |
20:32 | my @values = \('value' => $query->param('value'),) | |
20:33 | hmm nope | |
20:33 | that wont work | |
20:34 | actually its probably just easier to do | |
20:34 | my $value=$query->param('value'); | |
20:35 | $tmpl_obj->param(value => $value); | |
20:35 | 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 | there's that too | |
20:39 | chris | basically loops are good if you have lots of items of the same structure |
20:39 | eg search results | |
20:40 | the you give it an array of search results, each of which is a ref to a hash | |
20:40 | 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 | 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 | this is exciting! | |
20:42 | :-) | |
20:46 | 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 | 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 | 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 | how do I delete a column? | |
20:49 | alter table? | |
20:49 | chris | yep |
21:08 | kados | ok it's working ... all searches are being logged |
21:08 | is there some way to consolidate the searches so that searches for the same phrase only show up once? | |
21:08 | in the database | |
21:08 | chris | yep |
21:09 | 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 | is there an easy way to get that? | |
21:10 | that you know of? | |
21:10 | chris | yep using cgi |
21:11 | assuming $cgi is an object of type CGIl | |
21:11 | CGI; even | |
21:11 | kados | :-) |
21:11 | chris | then my $ip=$cgi->remote_host(); |
21:13 | kados | sweet it's working! |
21:16 | damn ... it broke | |
21:16 | hehe | |
21:24 | it'd be kind of cool to have a central datbase for all koha servers to connect to and store this data ;-) | |
21:24 | we could get a world-wide list going | |
21:24 | hehe | |
21:24 | organized by language perhaps | |
21:24 | chris | that would be kinda cool |
21:30 | kados | chris I'm getting a |
21:30 | 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 | and I did a | |
21:30 | grant all privileges on *.* to auth@"host78-077.athenscounty.lib.oh.us" identified by | |
21:30 | I used the IP address for that host too | |
21:31 | any other reason you can think of for why that's failing? | |
21:31 | chris | whats the db table say? |
21:31 | mysql -uroot -ppassword mysql | |
21:31 | select * from db; | |
21:31 | whats the host there say? | |
21:31 | if its localhost | |
21:31 | kados | strange it's not showing that user |
21:32 | chris | that'd do it |
21:32 | select * from user; | |
21:32 | is it in there? | |
21:32 | kados | yea it's in user |
21:33 | so db is used for remote connections? | |
21:33 | chris | no, thats for allowing access to dbs |
21:33 | you can have a user that can connect to mysql | |
21:33 | but has no rights in any dbs | |
21:33 | 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 | i dont know much about grant syntax | |
21:34 | 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 | usually | |
21:35 | kados | right |
21:36 | that's just got | |
21:36 | [mysqld] | |
21:36 | datadir=/var/lib/mysql | |
21:36 | socket=/var/lib/mysql/mysql.sock | |
21:36 | [mysql.server] | |
21:36 | user=mysql | |
21:36 | basedir=/var/lib | |
21:36 | [safe_mysqld] | |
21:36 | err-log=/var/log/mysqld.log | |
21:36 | pid-file=/var/run/mysqld/mysqld.pid | |
21:36 | chris | this is ur production machine? |
21:36 | 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 | from a machine other than it | |
21:38 | telnet address 3306 | |
21:38 | that should at least tell ya if its listening on the network | |
21:38 | or even | |
21:38 | telnet localhost 3306 | |
21:39 | kados | Connected to localhost.localdomain (127.0.0.1). |
21:39 | Escape character is '^]'. | |
21:39 | NHost 'localhost.localdomain' is not allowed to connect to this MySQL serverConnection closed by foreign host. | |
21:39 | so it's listening eh? | |
21:39 | hmmm ... | |
21:39 | chris | yep so thats not the problem |
21:41 | kados | hmmm actually from another host I get: |
21:41 | koha:/build/koha/opac# telnet 66.213.78.69 3306 | |
21:41 | Trying 66.213.78.69... | |
21:41 | telnet: Unable to connect to remote host: No route to host | |
21:41 | so maybe that is the problem | |
21:41 | chris | firewall |
21:42 | kados | ahh |
21:42 | that must be it | |
21:42 | chris | can u just poke a hole in it for 3306 ? |
21:42 | from certain ips, would be even better | |
21:44 | kados | yep that was it |
21:44 | 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 | iptables made easy | |
21:45 | chris | it makes manipulating iptables a lot more pleasant |
21:45 | kados | hehe |
21:46 | it's working: | |
21:46 | | neal stephenson | 4 | 66.213.78.0 | | |
21:46 | | neal stephenson | 8 | 66.213.78.0 | | |
21:46 | | neal stephenson | 8 | 69.58.13.236 | | |
21:46 | | neal gaiman | 0 | 69.58.13.236 | | |
21:46 | chris | cool |
04:13 | kados | chris around? |
04:14 | I'm trying to get a timestamp in the database too ... but I can't find a cgi timestamp | |
04:17 | ahh I see ... timestamp is handled by mysql | |
09:49 | paulAway | ca s'en va et ca revient... |
← Previous day | Today | Next day → | Search | Index