[Dev] Indexes on ref collections

John Anderson john at osafoundation.org
Tue Sep 14 15:52:53 PDT 2004


Hi Andi:

I was able to create an index on a ref collection and use it, however 
when I quit, rerun, and try to use it again I get the following traceback:

Traceback (most recent call last):
  File 
"d:\John\osaf\chandler\parcels\osaf\contentmodel\ItemCollection.py", 
line 159, in getResults
    self.updateResults()
  File 
"d:\John\osaf\chandler\parcels\osaf\contentmodel\ItemCollection.py", 
line 185, in updateResults
    self._results = [index for index in query]
  File "d:\John\osaf\chandler\repository\item\Item.py", line 173, in 
__setattr__
    _attrDict=self._references)
  File "d:\John\osaf\chandler\repository\item\Item.py", line 431, in 
setAttributeValue
    refDict.extend(value)
  File "d:\John\osaf\chandler\repository\item\ItemRef.py", line 694, in 
extend
    self.append(value, None)
  File "d:\John\osaf\chandler\repository\item\ItemRef.py", line 734, in 
append
    self.__setitem__(item._uuid, item, alias=alias)
  File "d:\John\osaf\chandler\repository\item\ItemRef.py", line 807, in 
__setitem__
    index.insertKey(key, previousKey)
  File "d:\John\osaf\chandler\repository\item\Indexes.py", line 126, in 
insertKey
    self.insert(self, key, afterKey)
  File "d:\John\osaf\chandler\repository\util\SkipList.py", line 246, in 
insert
    self._place(map, SkipList.INSERT, key, afterKey)
  File "d:\John\osaf\chandler\repository\util\SkipList.py", line 124, in 
_place
    if level > self.getLevel():
  File "d:\John\osaf\chandler\repository\util\SkipList.py", line 107, in 
getLevel
    return self._head.getLevel()

Any ideas?

Also--thinking more about pinning pain--was there another reason besides 
the Java argument that made reusing the python object, like you do for 
pinned objects hard?

John


More information about the Dev mailing list