Re: Strange catalog behavior on Plone 5.1

Hanno Schlichting <[email protected]> Fri, 21 Jul 2017 17:58:44 +0200
Newsgroups gmane.comp.web.zope.zodb
Message-ID <1500652724.1934306.1048399880.771C2CD5@webmail.messagingengine.com>
On Fri, Jul 21, 2017, at 17:41, Héctor Velarde wrote:
> thank you, Hanno; I have no idea how that code works, but I'll point out 
> your answer on the Plone community forum so somebody else could take a
> look.

The way I could imagine this works:

1. You create 10 news items
1.a. In Plone 5.0 these are added directly to the catalog
1.b. In Plone 5.1 these are only queued, to be added to the catalog
later
2. You delete one news item, suppressing events and the catalog doesn't
get to know about it
3. You enable the new behavior
4. You search the catalog
4.a. In Plone 5.0 nothing has been re-indexed yet, so the catalog
returns no results
4.b. In Plone 5.1 doing a search flushes and processes the catalog
queue. At this time all news items get added to the catalog, and since
they all have the new behavior at this moment, it gets added to the
catalog as well.

But with that logic, the catalog search should return 9 news items (10
minus the one that can't be found). Your test shows it returns 1 item
instead, which makes no sense to me. But I don't know a lot about
Dexterity or plone.api, so I'm probably missing something here.

Hanno

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.