Example #1
0
	def __pickle_init__(self):
		path = self.makePartitionName("LEX")
		if os.path.exists(path):
			try:
				print >> sys.stderr, "ReverseIndex metadata found at %s" % path
				pickle_tools.pickle_load_attrs(self,path)
			except IOError:
				print >> sys.stderr, "Unable to load ReverseIndex metadata from %s" % path
Example #2
0
    def __init__(self, contextPath):
        self.path = contextPath
        self.nextTermId = 0
        self.termWords = dict()
        self.parser = xml.sax.make_parser()
        self.handler = None

        if os.path.exists(self.path):
            pickle_tools.pickle_load_attrs(self, self.path)
Example #3
0
	def __pickle_init__(self):
		if self.path:
			try:
				print >> sys.stderr, "MemoryPartition data found at %s" % self.path
				key = self.indexKey
				pickle_tools.pickle_load_attrs(self,self.path) # can set indexKey
				if key and key != self.indexKey:
					raise ReverseIndexKeyError("MemoryPartition %s provided incorrect indexKey" % self.path)
			except IOError:
				print >> sys.stderr, "Unable to load MemoryPartition data from %s" % self.path
Example #4
0
	def __pickle_init__(self):
		metadataPath = self.path + self.metadataFileSuffix
		if os.path.exists(metadataPath):
			try:
				print >> sys.stderr, "ExternalPartition metadata found at %s" % self.path
				key = self.indexKey
				pickle_tools.pickle_load_attrs(self,metadataPath)
				if key and key != self.indexKey:
					raise ReverseIndexKeyError("ExternalPartition metadata %s provided incorrect indexKey" % metadataPath)
			except IOError:
				print >> sys.stderr, "Unable to load ExternalPartition metadata from %s" % metadataPath