def lucene_search(trans, cntrller, search_term, search_url, **kwd):
 message = escape(kwd.get('message', ''))
 status = kwd.get('status', 'done')
 full_url = ('%s/find?%s' % (search_url, urllib.urlencode({'kwd': search_term})))
 response = urllib2.urlopen(full_url)
 ldda_ids = loads(response.read())['ids']
 response.close()
 lddas = [trans.sa_session.query(trans.app.model.LibraryDatasetDatasetAssociation).get(ldda_id) for ldda_id in ldda_ids]
 return (status, message, get_sorted_accessible_library_items(trans, cntrller, lddas, 'name'))

def lucene_search ( trans , cntrller , search_term , search_url , ** kwd ) : message = escape ( kwd . get ( 'message' , '' ) ) status = kwd . get ( 'status' , 'done' ) full_url = ( '%s/find?%s' % ( search_url , urllib . urlencode ( { 'kwd' : search_term } ) ) ) response = urllib2 . urlopen ( full_url ) ldda_ids = loads ( response . read ( ) ) [ 'ids' ] response . close ( ) lddas = [ trans . sa_session . query ( trans . app . model . LibraryDatasetDatasetAssociation ) . get ( ldda_id ) for ldda_id in ldda_ids ] return ( status , message , get_sorted_accessible_library_items ( trans , cntrller , lddas , 'name' ) )
return display of results from a full-text lucene search of data libraries .