#NEWLINE# def IndexTerms( self ) : #NEWLINE# #INDENT# "Returns an index term dict in conjunction with PUT. If the term\n    dict is empty, returns an empty term dict. In either case, the\n    previous set of index terms is queried and the difference between\n    the old and new sets is used to delete or add this object's key to\n    the term posting lists.\n    " #NEWLINE# assert self . col_def . indexer #NEWLINE# try : #NEWLINE# #INDENT# if self . Get ( ) : #NEWLINE# #INDENT# index_terms = self . col_def . indexer . Index ( self . col_def , self . Get ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# index_terms = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# logging . exception ( ( 'generation of index terms for %s' % repr ( self . Get ( ) ) ) ) #NEWLINE# index_terms = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# return db_client . UpdateAttr ( value = ( self or None ) , action = 'PUT' )