Commit be21d3ca authored by Casey Duncan's avatar Casey Duncan

Added clear method to comply with plug-in index API.

parent a33a96b9
......@@ -115,6 +115,10 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem):
get_word = self.lexicon.get_word
return [get_word(wid) for wid in word_ids]
def clear(self):
"""reinitialize the index"""
self.index = Index(self.lexicon)
def _get_object_text(self, obj):
x = getattr(obj, self._fieldname)
if callable(x):
......
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