proof of concept for inverted index tables for search
authortipaul <tipaul>
Fri, 27 May 2005 09:30:23 +0000 (09:30 +0000)
committertipaul <tipaul>
Fri, 27 May 2005 09:30:23 +0000 (09:30 +0000)
commit41c209a4bd2f5ca075be562423c3903fe6c5d664
treee8dc88b88cf3add33cdd68328f44bc42d92f5182
parenta887b004367a32659cc9b7f314663264b9f219bb
proof of concept for inverted index tables for search

how it works :
* create the table marc_Tword with the following structure :
CREATE TABLE `marc_Tword` (
  `word` varchar(80) NOT NULL default '',
  `usedin` text NOT NULL,
  `tagsubfield` varchar(4) NOT NULL default '',
  PRIMARY KEY  (`word`,`tagsubfield`)
) TYPE=MyISAM;
* open a console & type export PERL5LIB & export KOHA_CONF as usual.
* fill this table with misc/build_marc_Tword.pl. Warning, this script uses a very very consumming but very fast method to fill the table : it does everything in memory, then write everything. Another method is provided (& commented), but it's 100x times slower (really !)
* open opac-search.pl and replace use C4::SearchMarc; by use C4::SearchMarcTest; as the API hasn't changed, it will work immediatly.
* go to opac-search (advanced search) & search whatever you want. Should work fine.

LIMITS :
* build_marc_Tword has problem with extended chars (accented ones mainly). So don't be afraid if you get sql errors. They are not a problem for a POC
* search works always order by title, whatever you choose.
* search works only search WORDA and WOARDB, not yet WORDA or WORDB or WORDA except WORDB.
C4/SearchMarcTest.pm [new file with mode: 0644]
misc/build_marc_Tword.pl [new file with mode: 0755]