[Koha-devel] killer feature ?
paul POULAIN
paul.poulain at free.fr
Fri Oct 17 02:29:13 CEST 2003
Hi,
I spoke with Rachel yesterday, and we spoke of something the could be a
"killer feature" in Koha.
In google, when you type a word wrong and get no or few answers, google
says "you could also try somethingAlmostSame" the SomethingAlmostSame
being in the DB.
In Koha, we could add this feature really easily (1 SQL query get the
answer :-) ).
I did some testing with the following SQL (on Dombes Abbey DB) :
SELECT count( * ) AS total, word FROM marc_word
WHERE sndx_word = soundex( "Raner" ) AND word <> "Raner"
GROUP BY word ORDER BY total DESC
It answers :
total
<http://127.0.0.1/phpMyAdmin/sql.php?lang=fr-iso-8859-1&server=1&db=dombes_030625&table=marc_word&pos=0&session_max_rows=30&disp_direction=horizontal&repeat_cells=100&dontlimitchars=0&sql_query=SELECT+count%28++%2A++%29++AS+total%2C+word+FROM+marc_word+WHERE+sndx_word+%3D+soundex%28++%22Raner%22++%29++AND+word+%3C%3E++%22Raner%22+GROUP++BY+word+ORDER+BY+%60total%60+ASC>
word
<http://127.0.0.1/phpMyAdmin/sql.php?lang=fr-iso-8859-1&server=1&db=dombes_030625&table=marc_word&pos=0&session_max_rows=30&disp_direction=horizontal&repeat_cells=100&dontlimitchars=0&sql_query=SELECT+count%28++%2A++%29++AS+total%2C+word+FROM+marc_word+WHERE+sndx_word+%3D+soundex%28++%22Raner%22++%29++AND+word+%3C%3E++%22Raner%22+GROUP++BY+word+ORDER+BY+%60word%60+ASC>
83 Rahner
1 rumeur
rahner being the right author name :-)
another test (with "Jésu", instead of Jésus) :
245 Jésus
182 Jacques
178 JEA
18 José
15 JOU
12 Joie
Note :
1- the SQL query is indexed, so very fast.
2- the major problem being to add this possibility when the search
returns less than X results (important GUI coding imho)
What do you think of this idea ? Anyone volunteer ?
--
Paul POULAIN
Consultant indépendant en logiciels libres
responsable francophone de koha (SIGB libre http://www.koha-fr.org)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20031017/9d5583c8/attachment-0002.htm>
More information about the Koha-devel
mailing list