def load_from_store(self):
        """Load index from store.

        :return: Whether index was correctly loaded or not
        :rtype: bool
        :raise AttributeError: If no datastore is defined

        """
        if not self._store:
            raise AttributeError('No datastore defined!')
        if self._store.has_blob('all_keys'):
            data = Serializer.deserialize(self._store.get_blob('all_keys'))
            self.load_from_data(data)
            return True
        elif self._store.has_blob('all_keys_with_undefined'):
            blob = self._store.get_blob('all_keys_with_undefined')
            data = Serializer.deserialize(blob)
            self.load_from_data(data, with_undefined=True)
            return True
        else:
            return False
def load_from_store ( self ) : if not self . _store : raise AttributeError ( 'No datastore defined!' ) if self . _store . has_blob ( 'all_keys' ) : data = Serializer . deserialize ( self . _store . get_blob ( 'all_keys' ) ) self . load_from_data ( data ) return True elif self . _store . has_blob ( 'all_keys_with_undefined' ) : blob = self . _store . get_blob ( 'all_keys_with_undefined' ) data = Serializer . deserialize ( blob ) self . load_from_data ( data , with_undefined = True ) return True else : return False
Load index from store.

        :return: Whether index was correctly loaded or not
        :rtype: bool
        :raise AttributeError: If no datastore is defined