Dieter Maurer wrote:
Jim Fulton wrote at 2005-5-26 14:43 -0400:
...
Probably the indexes that we *most* want to avoid reindexing are
text indexes. We have a ISearchableText interface that we
commonly adapt objects to to get the text to index. We really
can't predict how this text is computed.
Then, we probably do something wrong...
That's always a possibility. I think what we are doing is
pretty reasonable. Perhaps you have other suggestions.
...
A safer strategy seems to me to be to have the indexes themselves
responsible for detecting changes that they care about. I'm
pretty sure that some of the Zope 2 indexes are careful to avoid
reindexing, or at least avoid updating indexes if indexed values
haven't changed.
Even computing the value for a text index (without any change
to the index itself) can be very expensive: it may
include expensive fetching of a large object,
an expensive conversion (text extraction), expensive splitting
and comparison to what is currently indexes.
Perhaps. It depends a lot on the application.
I suggest that, if this optimization is important, it might
be much easier and cleaner to make text extracttion and comparison
cheap, rather than, trying to solve the problem with a more complex
event model.
I would not like this overhead for e.g. workflow state changes by
default.
I think it would be very difficult to come up with rules
for deciding which events might effect a text value and which would not.
For example, I can easily imagine objects who's searchable text
depends on their workflow state.
Jim
--
Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com