[Zope-CMF] Question: search weirdness
Florent Guillaume
fg@nuxeo.com
Thu, 10 Apr 2003 16:58:30 +0200
In article <20030409211125.90560.qmail@web20705.mail.yahoo.com> you write:
> I have created a product with 2 classes. If I create
> one object, then create the second object inside the
> first, searches that match the first object also match
> the inner objects, although the inner objects really
> _don't_ match the search criteria. It's as if the
> inner objects are acquiring from the parent object.
>
> Details:
> First object: CodeProject(SkinnedFolder,
> DefaultDublinCoreIml, PortalContent).
>
> I want content that can contain other content, is
> searchable, and has metadata. The content's title and
> description are from metadata. In the class I define
> SearchableText for id, title, and description. This
> works as intended, in that the searches work, and
> viewing in ZMI gives a folderish view.
>
> Second object, intended to go inside first:
> ToolBox(SkinnedFolder)
>
> No need to be searchable, it's merely a container with
> custom skins. Will hold things like files, news
> items, etc. Searches on its title or id or
> description fail, which is correct behavior.
>
> BUT, say my CodeProject has a description 'A Java
> project'. When I search on 'Java', I get hits on my
> CodeProject plus any of the ToolBoxes I have created
> inside. I verified that the metadata description for
> the toolboxes is empty - it isn't getting the value of
> the CodeProject's description. If I do Advanced
> Search, I get a hit on the toolboxes only when doing
> Full Text search, not when searching on Description.
>
> What's happening here?
You're acquiring SearchableText.
Simply define it to return '' in your ToolBox class.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com