Commit 8726a792 authored by Michel Pelletier's avatar Michel Pelletier

Fixed a bug where references were not removed from the unindex when

removing them from the index.
parent 419eb703
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Simple column indices""" """Simple column indices"""
__version__='$Revision: 1.6 $'[11:-2] __version__='$Revision: 1.7 $'[11:-2]
from Globals import Persistent from Globals import Persistent
import BTree import BTree
...@@ -92,7 +92,7 @@ import IOBTree ...@@ -92,7 +92,7 @@ import IOBTree
from intSet import intSet from intSet import intSet
import operator import operator
from Missing import MV from Missing import MV
import string import string, pdb
ListType=type([]) ListType=type([])
StringType=type('s') StringType=type('s')
...@@ -190,7 +190,8 @@ class UnIndex(Persistent): ...@@ -190,7 +190,8 @@ class UnIndex(Persistent):
return None return None
set = index.get(k) set = index.get(k)
if set is not None: set.remove(i) if set is not None: set.remove(i)
del unindex[i]
self._index = index self._index = index
self._unindex = unindex self._unindex = unindex
...@@ -231,6 +232,7 @@ class UnIndex(Persistent): ...@@ -231,6 +232,7 @@ class UnIndex(Persistent):
if request.has_key(id+'_usage'): if request.has_key(id+'_usage'):
# see if any usage params are sent to field # see if any usage params are sent to field
opr=string.split(string.lower(request[id+"_usage"]),':') opr=string.split(string.lower(request[id+"_usage"]),':')
pdb.set_trace()
opr, opr_args=opr[0], opr[1:] opr, opr_args=opr[0], opr[1:]
if opr=="range": if opr=="range":
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
""" """
__version__='$Revision: 1.7 $'[11:-2] __version__='$Revision: 1.8 $'[11:-2]
from Globals import Persistent from Globals import Persistent
import BTree, IIBTree, IOBTree, OIBTree import BTree, IIBTree, IOBTree, OIBTree
...@@ -249,6 +249,8 @@ class UnTextIndex(Persistent): ...@@ -249,6 +249,8 @@ class UnTextIndex(Persistent):
else: else:
del index[n][i] del index[n][i]
del self._unindex[i]
self._index = index self._index = index
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment