Example #1
0
 def addTermNarrower(self, tagSubjectList, termNarrower):
     if not index.exists_in(utils.indexerDir(), utils.indexName):
         self.createNewIndex()
     for tagSubject in tagSubjectList:
         self.__writer.add_document(tagSubject=unicode(tagSubject),
                                    termNarrower=unicode(termNarrower))
     self.addToWordList(termNarrower)
Example #2
0
 def __init__(self):
     if not index.exists_in(utils.indexerDir(), utils.indexName):
         return
     self.ix = open_dir(utils.indexerDir(), indexname=utils.indexName)
Example #3
0
 def addTagScopeNote(self, tagSubject, tagScopeNote):
     if not index.exists_in(utils.indexerDir(), utils.indexName):
         self.createNewIndex()
     self.__writer.add_document(tagSubject=unicode(tagSubject),
                                tagScopeNote=unicode(tagScopeNote))
     self.addToWordList(tagScopeNote, 5)
Example #4
0
 def createNewIndex(self):
     ix = create_in(utils.indexerDir(),
                    self.schema,
                    indexname=utils.indexName)
     self.__writer = ix.writer()