[Zope-dev] Re: [Zope] CatalogAware

2001-06-26 Thread Chris McDonough

Excellent, thanks so much Toby.  Maybe some feedback will come in...

- C


Toby Dickenson wrote:
 
 Chris McDonough [EMAIL PROTECTED] wrote:
 
 I actually think this about sums it up.  If you have time to look at it
 Toby, it would be much appreciated.  I don't think it's a very
 complicated set of fixes, its just not on the radar at the moment, and
 might require some thought about backwards-compatibility.
 
 Not a patch, but Ive fixed all three known CatalogAware problems in a
 separate product; a new base class that derives from CatalogAware:
 
 http://www.zope.org/Members/htrd/BetterCatalogAware/
 
 The techniques used in this product have been thoroughly stressed in
 several other production systems, but this is the first time they have
 been collected together in one place so bugs are possible.
 
 That makes CatalogAware much saner and will produce less bloat.
 Actually, maybe I should just go make that change in the trunk and the
 2.4 branch, although I'm a little afraid of what (if anything) it will
 break for everybody.  To be honest, I really don't have much time to
 spend thinking about this, and my fears are probably just FUD.
 
 Im not sure how many people are using CatalogAware; I think many
 serious users have been scared off by the problem reports in the list
 archives.
 
 IMO fixing this may be worth a little breakage.
 
 Toby Dickenson
 [EMAIL PROTECTED]
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: [Zope] CatalogAware

2001-06-26 Thread Chris McDonough

I actually think this about sums it up.  If you have time to look at it
Toby, it would be much appreciated.  I don't think it's a very
complicated set of fixes, its just not on the radar at the moment, and
might require some thought about backwards-compatibility.

- C


Toby Dickenson wrote:
 
 On Tue, 26 Jun 2001 09:31:02 -0400, Chris McDonough
 [EMAIL PROTECTED] wrote:
 
 Right.. if you don't use CatalogAware, however, and don't unindex before
 reindexing an object, you should see a huge bloat savings, because the
 only things which are supposed to be updated then are indexes and
 metadata which have data that has changed.
 
 CatalogAware has been blamed for alot of problems. Its three
 weaknesses I am aware of are:
 
 a. Unindexing before ReIndexing causes bloat by defeating the
catalogs change-detection tricks.
 
 b. It uses URLs not paths, and so doesnt play right with
virtual hosting
 
 c. It uses the same hooks as ObjectManager to detect that
it has been added/removed from a container
ObjectManager, and therefore the two cant be easily
mixed together as base classes.
 
 All of these are fixable, and I feel a patch coming on.
 
 Are there some deeper problems I am not aware of?
 
 Toby Dickenson
 [EMAIL PROTECTED]
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: [Zope] CatalogAware

2001-06-26 Thread Jeff Sasmor


Subject: [Zope] CatalogAware


 CatalogAware has been blamed for alot of problems. Its three
 weaknesses I am aware of are:
snip 
 
 b. It uses URLs not paths, and so doesnt play right with
virtual hosting
 

*

I ran into this problem using VHMonster with my EventFolder product
and found a work-around, just for anyone who might be struggling with this

See http://www.netkook.com/Members/jeff/ef/faq/document_view#vhost

This article discusses how to use _vh_ with  VHM. 
(boy does that sound cryptic...)

Jeff Sasmor
[EMAIL PROTECTED]
www.netkook.com





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: [Zope] CatalogAware does not work?

2001-04-18 Thread Casey Duncan

John Morton wrote:
 
 
   Why couldn't CatalogAware do this? If nobody has a good reason, I might
   push forth a patch to CatalogAware to implement this.
 
 A simple case for the present flexibility is that you don't need to reindex
 for every property change, just the ones that are actually indexed.
 

Agreed, CatalogAware should ideally check this to make sure reindexing
is necessary.

 A more complicated case would be an operation that changes several instances
 at once. It's expensive to reindex for every instance you change, so it would
 be useful to pass a flag to the ZClass's change method to tell it not to do a
 reindex, and reindex the lot once the operation over all the instances is
 completed.

I have actually done this for a Product I am developing. It allows you
to accumulate
property changes and reindex only once. Supposedly, the Catalog is more
efficient in this regard anyway as of 2.3.

 I guess that you could build this kind of functionality into CatalogAware,
 but I'm generally in favour of having flexible and optional rather than
 automatic reindexing, and just adding documentation to discuss some of the
 different cases.
 
 You could hack Property Sheet Interface to add a call to reindex if the
 ZClass is catalog aware.

I would not want to make PropertyManager directly aware of CatalogAware
if I could get away with it. Perhaps the way to deal with this is to
have PropertyManager call a hookable method afterChangeProperties or
some such, passing a list of properties changed. Then your ZClass could
simply call reindex_object if it feels it is necessary. That would give
full disclosure and behavior control back to your specific
implementation. But it would simultaneously cover property changes made
in the management screens and everywhere else.

I am moving this discussion over to zope-dev to see if anyone else there
has any ideas.

-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`--

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope] Catalogaware ZClass

2001-01-30 Thread Sven Hohage

Hello,
usually I'm more patient but this time it's a very
important feature(I have to build an archive).
That's my question from yesterday:
---
I try to delete a Catalogware ZClass with subobjects that are
also ZClasses.
That's my method to delete a Class:
  dtml-in "objectValues('ZClassPage')"
dtml-let x=sequence-item
dtml- if "in_work"
   dtml-call "manage_delObjects([x.id])"
/dtml-if
/dtml-let
   /dtml-in

But Zope answers:
   An exception occurred in a DTML method or document. 

 Error type: BadRequest
 Error value: 980785769 does not exist 
But '980785769' EXISTS in the management-interface !!  :-((
---
It would be very nice if someone could give me a hint.Thanks!

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Catalogaware ZCLass and deleting

2001-01-29 Thread Sven Hohage

Hello,
I try to delete a Catalogware ZClass with subobjects that are
also ZClasses.
That's my method to delete a Class:
--
  dtml-in "objectValues('ZClassPage')"
dtml-let x=sequence-item
dtml- if "in_work"
   dtml-call "manage_delObjects([x.id])"
/dtml-if
/dtml-let
   /dtml-in

But Zope answers:
   An exception occurred in a DTML method or document. 

 Error type: BadRequest
 Error value: 980785769 does not exist 
But '980785769' EXISTS in the management-interface !!  :-((


Thanks!

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] CatalogAware

2000-08-29 Thread Yapo Sébastien



Hi !

I useobjects from a class which inherits from 
CatalogAware.
The objects index themselves into the ZCatalog but 
I get strange results when I try to search in this ZCatalog... The problem is 
solved after reindexing the object via the reindex_object() method but this 
works only for manage_edit ... I can't index my object properly in the 
manage_add method (I get the same problem)
Newlyindexed objects seem to be added to the 
ZCatalog with the indexes from the previous cataloged object (or something like 
that)

Is there a bug I should be 'awared' to or am I 
doing something the wrong way ?

 
SY


[Zope] CatalogAware Problems?

2000-08-29 Thread Chris Withers

 Yapo Sébastien wrote:
 Is there a bug I should be 'awared' to or am I doing something the
 wrong way ?

Maybe if you said what the bug was and included a traceback, more people
would be able to help?

Also, posting in HTML means a lot of people can't read what you post...

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] CatalogAware Problems?

2000-08-29 Thread Bill Anderson

Chris Withers wrote:
 
  Yapo Sébastien wrote:
  Is there a bug I should be 'awared' to or am I doing something the
  wrong way ?
 
 Maybe if you said what the bug was and included a traceback, more people
 would be able to help?
 
 Also, posting in HTML means a lot of people can't read what you post...

And of those of us who can, many won't.

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] CatalogAware

2000-08-29 Thread Dieter Maurer

Yapo =?ISO-8859-1?Q?S=E9bastien?= writes:
  I use objects from a class which inherits from CatalogAware.
  The objects index themselves into the ZCatalog but I get strange results =
  when I try to search in this ZCatalog... The problem is solved after =
  reindexing the object via the reindex_object() method but this works =
  only for manage_edit ... I can't index my object properly in the =
  manage_add method (I get the same problem)
This is a bug, I recently found in "GlobbingLexicon".
It may be, too, in a normal "Lexicon".

The collector (URL:http://classic.zope.org/Collector) contains
a patch for "GlobbingLexicon".
The patch is applied in Zope 2.2.1.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )