def search_li(query_string, limit, mdl_cfg): index_dir = mdl_cfg['LUCENE']['lucene_index_dir'] rows = boolean_search_lucene_index(index_dir, query_string, limit) if len(rows) == 0: print 'No documents found.' return results = [[row[0], row[10]] for row in rows] return results
def search_li(query_string, limit, mdl_cfg): index_dir = mdl_cfg['LUCENE']['lucene_index_dir'] rows = boolean_search_lucene_index(index_dir, query_string, limit) if len(rows) == 0: print 'No documents found.' return ''' Sahil The first is maximum, considering this as the threshold normalizing scores and considering the score only above the threshold ''' results = [[row[0], row[10]] for row in rows] return results