`zope.index.text.TextIndex` sometimes uses the wrong lexicon

Bug #232516 reported by Alex Smith
2
Affects Status Importance Assigned to Milestone
Zope 3
Won't Fix
Undecided
Unassigned
zope.index
Fix Released
Undecided
Tres Seaver

Bug Description

`zope.index.text.TextIndex` will use the wrong lexicon when constructed given an index but no lexicon. In this case, `TextIndex` will use the provided index, but create its own lexicon instead of the lexicon its index is using. `TextIndex` should always use the same lexicon that is used by its index.

At a minimum, `TextIndex` should raise an exception when constructed with an index but no lexicon. Ideally, `TextIndex` would be able to use the lexicon from the provided index itself, but currently there is no specified way to get a lexicon from an index.

Related branches

Revision history for this message
Fred Drake (fdrake) wrote : Re: [Bug 232516] [NEW] `zope.index.text.TextIndex` sometimes uses the wrong lexicon

It is unfortunate that the constructor for the `TextIndex` class isn't
documented except by the code; the tests cover only the case for
passing no arguments.

As long as there's no API to get a lexicon from the underlying index
that was passed in, the constructor should raise an exception when
passed an index but no lexicon. `ValueError` would be appropriate in
this case.

Tres Seaver (tseaver)
Changed in zope3:
status: New → Won't Fix
Tres Seaver (tseaver)
Changed in zope.index:
assignee: nobody → Tres Seaver (tseaver)
status: New → In Progress
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope.index:
status: In Progress → Fix Committed
status: Fix Committed → 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.