Re: [Zope3-Users] catalog indexing adapter interfaces
> Alen Stanisic wrote: > I noticed that if I adapted a persistent content type and created a > catalog with index on one of the fields provided by the adapter > interface, the indexing worked for all of my content that was there at > time of catalog creation. But any new content objects created after > catalog creation would not get indexed though. > I just had a play with this again and still can't resolve the problem, I could be doing something wrong so I will try and provide more detail: This is my adapter I am trying to index: Here is the IItemInfo interface: class IItemInfo(Interface): isPaid = Bool(title = _("Is Item Paid")) In the implementation of IItemInfo isPaid is a property wrapped method, it just checks annotation value and returns True/False. I want to be able to only list paid IShoppingItem-s and I created a catalog for that with a Field Index on IItemInfo interface and isPaid field. Here is an example of how I search the catalog: search_filter['isPaid'] = [True] content_catalog.searchResults(**search_filter) The problem is every time I create a IShoppingItem type object and mark it as paid, it is not being picked up by my catalog. I have to go to the catalog object through the ZMI and hit 'Reindex' button and after that all is well and the new object is indexed and returned by my search. Not sure what could be wrong here. Thanks for any suggestions Alen ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] catalog indexing adapter interfaces
Hi Tahara, On 10/22/05, TAHARA Yusei <[EMAIL PROTECTED]> wrote: > Hi. > > At Thu, 20 Oct 2005 11:48:41 +1000, > Alen Stanisic wrote: > > I noticed that if I adapted a persistent content type and created a > > catalog with index on one of the fields provided by the adapter > > interface, the indexing worked for all of my content that was there at > > time of catalog creation. But any new content objects created after > > catalog creation would not get indexed though. > > It doesn't make sense to me. > > I use catalog for my application and indexing worked after added > new content. I think catalog does not index object that was added before > catalog creation. I think indexing will work for objects added after IntId Utility is added even if catalog is not there at the time. > catalog has event subscribers in zope/app/catalog/configure.zcml > and does automatic indexing for adaptable objects. My adapter provides just a Bool type field and I created my fieldindex for that field. I will have to investigate my problem further now that I know that indexing on adapter interfaces should work. Thanks Alen ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] catalog indexing adapter interfaces
Hi. At Thu, 20 Oct 2005 11:48:41 +1000, Alen Stanisic wrote: > I noticed that if I adapted a persistent content type and created a > catalog with index on one of the fields provided by the adapter > interface, the indexing worked for all of my content that was there at > time of catalog creation. But any new content objects created after > catalog creation would not get indexed though. It doesn't make sense to me. I use catalog for my application and indexing worked after added new content. I think catalog does not index object that was added before catalog creation. catalog has event subscribers in zope/app/catalog/configure.zcml and does automatic indexing for adaptable objects. Best Regards, -- Tahara Yusei [EMAIL PROTECTED] ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] catalog indexing adapter interfaces
Hi, I noticed that if I adapted a persistent content type and created a catalog with index on one of the fields provided by the adapter interface, the indexing worked for all of my content that was there at time of catalog creation. But any new content objects created after catalog creation would not get indexed though. It feels as if I am missing a marker for my adapter that will make it get indexed on content (it adapts) created events. Any thoughts? Thanks in advance Alen ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users