SPAM - Re: [Zope] ZCatalog can't find anything
Max M
maxm@mxm.dk
Tue, 14 May 2002 17:04:35 +0200
Eric Adam wrote:
>I am inside of a zcatalog instance and on the "Find Objects" tab it says "Use this form to locate objects to be cataloged. Those objects which are found
>will be automatically added to the catalog.".
>
These objects will indeed be cataloged. But if you want to do a full
text search, the objects you want to include needs to have a method
called "PrincipiaSearchSource" that returns all the contents of your
classes as clear text.
There are other ways to do it, but that is the easiest.
>So I enter in some search criteria for the objects I want to catalog and hit the "Find and Catalog" button.
>
>After the search ran, it returned no results, which are supposed to be listed on the "catalog" tab.
>
>I mentioned the regular find tab of objects because I figured that they used the same base for searching and that it was working.
>
>I have nothing indexed in the catalog because it can't find anything and I haven't written anything that catalogs itself.
>
>Am I still wrong? This is the cancept I get from 2 books and the docs on the Zope site.
>
If you have an object like this:
class objToCatalog:
meta_type = 'objToCatalog'
title = 'This is my title'
content = 'this is my content'
def PrincipiaSearchSource(self):
return self.title + ' ' + self.content
Then you can use the "Find and Catalog" function to find all objects
with meta_type 'objToCatalog'. And your vocabulary will contain the
words: 'This', 'is', 'my', 'title', 'content'
regards Max M