• Jeremy Hylton's avatar
    Two changes and a question posing as a comment. · 504af04c
    Jeremy Hylton authored
    In unindex_doc() call _del_wordinfo() for each unique wid in the doc,
    not for each wid.  Before we had WidCode and phrase searching,
    _docwords stored a list of the unique wids.  The unindex code wasn't
    updated when _docwords started storing all the wids, even duplicates.
    
    Replace the try/except around __getitem__ in _add_wordinfo() with a
    .get() call.
    
    Add XXX comment about the purpose of the try/except(s) in
    _del_wordinfo().  I suspect they only existed because _del_wordinfo()
    was called repeatedly when a wid existed more than once.
    504af04c
BaseIndex.py 9.12 KB