[Zope] Squishdot indexing. The right way?

ed colmar element@immersivearts.com
Fri, 21 Apr 2000 20:04:03 -0600


I've seen several posts regarding the indexing in Squishdot.  I understand
that it is outdated, and should be replaced with the new catalog.  How is
this done?  

The reason I ask is because I have based much of my own code off Squishdot,
and would like to implement the /correct/ calls.

I'm interested in the python code, not dtml examples.  

Thanks for any help or pointers!


As far as I can tell it uses these calls to set up the index:

        self.subjects = PersistentMapping()     
        self.indices=PersistentMapping({'author': Index(),     
                                        'body'  : TextIndex(),     
                                        'title' : TextIndex(),     
                                        'subject': Index(),     
                                       })     
        self.subjindexes = PersistentMapping({'summary': TextIndex(),}) 


These calls to add:

        for k in self.indices.keys():     
            self.indices[k].index_item(id)  

These calls to update:

        for index in self.indices.values():               
            try:    index.index_item(id)     
            except: pass 


and 3 methods to search:

		__call__
		_searchable_result_columns
		_searchable_arguments