Commit d1f544be authored by Michel Pelletier's avatar Michel Pelletier

Fixed bug in positions method that still referenced _data (ala

ZTables)
parent 7d3031bb
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
""" """
__version__='$Revision: 1.8 $'[11:-2] __version__='$Revision: 1.9 $'[11:-2]
from Globals import Persistent from Globals import Persistent
import BTree, IIBTree, IOBTree, OIBTree import BTree, IIBTree, IOBTree, OIBTree
...@@ -138,7 +138,7 @@ class UnTextIndex(Persistent): ...@@ -138,7 +138,7 @@ class UnTextIndex(Persistent):
self._unindex = IOBTree() self._unindex = IOBTree()
def positions(self, docid, words): def positions(self, docid, words, obj):
"""Return the positions in the document for the given document """Return the positions in the document for the given document
id of the word, word.""" id of the word, word."""
id = self.id id = self.id
...@@ -150,12 +150,10 @@ class UnTextIndex(Persistent): ...@@ -150,12 +150,10 @@ class UnTextIndex(Persistent):
id = self._schema[id] id = self._schema[id]
row = self._data[docid]
if self.call_methods: if self.call_methods:
doc = str(f(row, id)()) doc = str(f(obj, id)())
else: else:
doc = str(f(row, id)) doc = str(f(obj, id))
r = [] r = []
for word in words: for word in words:
......
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