_apply_index with multiunion

Bug #143378 reported by Bug Importer
0
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Low
Unassigned

Bug Description

Unindex._apply_index still don`t use multiunion for the range search in the trunk.

for 'or' operator may be usefull
def multiunion( seq ):
   if not len(seq):
       return seq
   return reduce( union, seq )

Tags: feature zope
Revision history for this message
Hanno Schlichting (hannosch) wrote :

This probably applies to the lines:

for k, set in setlist:
    if isinstance(set, int):
        set = IISet((set,))
    r = set_func(r, set)

If this is a range search and the "if operator=="or": set_func = union" has been set, this could do a multiunion instead of a for loop and a union.

Changed in zope2:
status: New → Confirmed
Revision history for this message
Hanno Schlichting (hannosch) wrote :

This has been fixed in the recent ZCatalog work.

Changed in zope2:
milestone: none → 2.13.0a3
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.