#NEWLINE# def _ToPb( self ) : #NEWLINE# #INDENT# 'Rebuilds the full text index, then delegates to the superclass.\n\n    Returns:\n      entity_pb.Entity\n    ' #NEWLINE# for properties_to_index in self . _searchable_properties : #NEWLINE# #INDENT# index_property_name = SearchableEntity . IndexPropertyName ( properties_to_index ) #NEWLINE# if ( index_property_name in self ) : #NEWLINE# #INDENT# del self [ index_property_name ] #NEWLINE# #UNINDENT# if ( not properties_to_index ) : #NEWLINE# #INDENT# properties_to_index = self . keys ( ) #NEWLINE# #UNINDENT# index = set ( ) #NEWLINE# for name in properties_to_index : #NEWLINE# #INDENT# if ( not self . has_key ( name ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# values = self [ name ] #NEWLINE# if ( not isinstance ( values , list ) ) : #NEWLINE# #INDENT# values = [ values ] #NEWLINE# #UNINDENT# if ( isinstance ( values [ 0 ] , basestring ) and ( not isinstance ( values [ 0 ] , datastore_types . Blob ) ) ) : #NEWLINE# #INDENT# for value in values : #NEWLINE# #INDENT# index . update ( SearchableEntity . _FullTextIndex ( value , self . _word_delimiter_regex ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# index_list = list ( index ) #NEWLINE# if index_list : #NEWLINE# #INDENT# self [ index_property_name ] = index_list #NEWLINE# #UNINDENT# #UNINDENT# return super ( SearchableEntity , self ) . _ToPb ( )