|
|
|
|
|
|
|
|
if df_list: |
|
|
if df_list: |
|
|
return pl.concat(df_list) |
|
|
return pl.concat(df_list) |
|
|
schema = dict() |
|
|
schema = dict() |
|
|
for fieldnm in selectFields: |
|
|
|
|
|
schema[fieldnm] = str |
|
|
|
|
|
|
|
|
for field_name in selectFields: |
|
|
|
|
|
if field_name == 'score()': # Workaround: fix schema is changed to score() |
|
|
|
|
|
schema['SCORE'] = str |
|
|
|
|
|
else: |
|
|
|
|
|
schema[field_name] = str |
|
|
return pl.DataFrame(schema=schema) |
|
|
return pl.DataFrame(schema=schema) |
|
|
|
|
|
|
|
|
@singleton |
|
|
@singleton |
|
|
|
|
|
|
|
|
self.connPool.release_conn(inf_conn) |
|
|
self.connPool.release_conn(inf_conn) |
|
|
res = concat_dataframes(df_list, selectFields) |
|
|
res = concat_dataframes(df_list, selectFields) |
|
|
if matchExprs: |
|
|
if matchExprs: |
|
|
res = res.sort(pl.col("score()") + pl.col("pagerank_fea"), descending=True, maintain_order=True) |
|
|
|
|
|
|
|
|
res = res.sort(pl.col("SCORE") + pl.col("pagerank_fea"), descending=True, maintain_order=True) |
|
|
res = res.limit(limit) |
|
|
res = res.limit(limit) |
|
|
logger.debug(f"INFINITY search final result: {str(res)}") |
|
|
logger.debug(f"INFINITY search final result: {str(res)}") |
|
|
return res, total_hits_count |
|
|
return res, total_hits_count |