Logo Search packages:      
Sourcecode: zope-managableindex version File versions  Download package

def ManagableIndex::ManagableIndex::ManagableIndex::_remove (   self,
  _isInstance = isinstance,
  _IntType = IntType 
) [private]

unindex *docId* under *term*.

Definition at line 474 of file ManagableIndex.py.

00474                                                                           :
    '''unindex *docId* under *term*.'''
    index= self._index
    dl= index.get(term); isInt= _isInstance(dl,_IntType)
    if dl is None or isInt and dl != docId:
      raise ValueError('Attempt to remove nonexisting document %s from %s'
                       % (docId, self.id)
    if isInt: dl = None
    else: dl.remove(docId)
    if not dl:
      del index[term]; self.__len__.change(-1)
      if self.ReverseOrder: self._reverseOrder.remove(reverseOrder(term))

  def _load(self,term, _isInstance= isinstance, _IntType= IntType):

Generated by  Doxygen 1.6.0   Back to index