Commit da558b88 authored by Chris McDonough's avatar Chris McDonough

Merged in Jim's big fix from 2.3 branch dealing with returning the lexicon...

Merged in Jim's big fix from 2.3 branch dealing with returning the lexicon attributes of a Vocabulary object.
parent 1fa56ad1
......@@ -354,7 +354,9 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
indexes[name] = UnIndex.UnIndex(name)
elif index_type == 'TextIndex':
lexicon=self.lexicon
if type(lexicon) is type(''): lexicon=getattr(self, lexicon)
if type(lexicon) is type(''):
lexicon=getattr(self, lexicon).getLexicon()
indexes[name] = UnTextIndex.UnTextIndex(name, None, None, lexicon)
elif index_type == 'KeywordIndex':
indexes[name] = UnKeywordIndex.UnKeywordIndex(name)
......
......@@ -158,6 +158,9 @@ class Vocabulary(Item, Persistent, Implicit,
else:
self.lexicon = Lexicon.Lexicon(stop_word_dict)
def getLexicon(self):
return self.lexicon
def query(self, pattern):
""" """
result = []
......
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