def _NewIndexFromPb(index_metadata_pb):
 index = _NewIndexFromIndexSpecPb(index_metadata_pb.index_spec())
 if index_metadata_pb.field_list():
  index._schema = _NewSchemaFromPb(index_metadata_pb.field_list())
 return index

def _NewIndexFromPb ( index_metadata_pb ) : index = _NewIndexFromIndexSpecPb ( index_metadata_pb . index_spec ( ) ) if index_metadata_pb . field_list ( ) : index . _schema = _NewSchemaFromPb ( index_metadata_pb . field_list ( ) ) return index
creates an index from a search_service_pb .