#NEWLINE# def register_index( model , mapping ) : #NEWLINE# #INDENT# for ( field_name , lookups ) in mapping . items ( ) : #NEWLINE# #INDENT# if ( not isinstance ( lookups , ( list , tuple ) ) ) : #NEWLINE# #INDENT# lookups = ( lookups , ) #NEWLINE# #UNINDENT# for lookup in lookups : #NEWLINE# #INDENT# lookup_def = None #NEWLINE# if ( not isinstance ( lookup , ExtraFieldLookup ) ) : #NEWLINE# #INDENT# lookup_def = lookup #NEWLINE# lookup = create_lookup ( lookup_def ) #NEWLINE# #UNINDENT# lookup . contribute ( model , field_name , lookup_def ) #NEWLINE# resolver . create_index ( lookup )