[Zope] Follow up on Zcatalog weirdness.

Martijn Pieters mj@antraciet.nl
Sat, 11 Sep 1999 18:13:23 +0200


At 14:57 11-9-99 , Kuraiken wrote:
>It seems it's not words less than 4 letters. I also have a CD titled "Hi 
>Ka Ri"
>and searching for "hi", "ka" and "ri" respectively works as advertised. Which
>leads me to suspect that, for some reason, the words: for, you, me and to are
>"special". In that search refuses to find them.
>
>I'd sleep better if others could confirm this. (Perhaps the daemon under the
>hood is lazy or something... :-))

The ZCatalog indeed ignores certain words. They are listed in 
lib\python\SearchIndex\TextIndex.py (at the end), and they are called Stop 
Words. ZCatalog does not index these because they are considered to be part 
of the 'fluff' of text, they are not relevant keywords in most texts. They 
are also too common in textxs to be of any use to pinpoint a particular 
document. If ZCatalog would index these, you index would blow up like a 
balloon with irrelevant and useless data. This is something all text 
indexers do.

You also said you couldn't get your ZClasses to update the Catalog. Make 
sure you have chosen CatalogAware as the first base class (it should be 
listed as the second class on the Basic tab as _ZClass_for_CatalogAware), 
and you should call index_object after every change on the object.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| T: +31 35 7502100 F: +31 35 7502111
| mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
---------------------------------------------