@@ -246,10 +246,12 @@ async def post_processing(uri=Form(), userName=Form(), password=Form(), database
246246 json_obj = {'api_name' : 'post_processing/update_similarity_graph' , 'db_url' : uri , 'logging_time' : formatted_time (datetime .now (timezone .utc ))}
247247 logger .log_struct (json_obj )
248248 logging .info (f'Updated KNN Graph' )
249- if "create_fulltext_index" in tasks :
250- await asyncio .to_thread (create_fulltext , uri = uri , username = userName , password = password , database = database )
251- json_obj = {'api_name' : 'post_processing/create_fulltext_index' , 'db_url' : uri , 'logging_time' : formatted_time (datetime .now (timezone .utc ))}
252- logger .log_struct (json_obj )
249+
250+ if "enable_hybrid_search_and_fulltext_search_in_bloom" in tasks :
251+ await asyncio .to_thread (create_fulltext , uri = uri , username = userName , password = password , database = database ,type = "entities" )
252+ # await asyncio.to_thread(create_fulltext, uri=uri, username=userName, password=password, database=database,type="keyword")
253+ josn_obj = {'api_name' : 'post_processing/enable_hybrid_search_and_fulltext_search_in_bloom' , 'db_url' : uri , 'logging_time' : formatted_time (datetime .now (timezone .utc ))}
254+ logger .log_struct (josn_obj )
253255 logging .info (f'Full Text index created' )
254256 if os .environ .get ('ENTITY_EMBEDDING' ,'False' ).upper ()== "TRUE" and "materialize_entity_similarities" in tasks :
255257 await asyncio .to_thread (create_entity_embedding , graph )
@@ -467,8 +469,8 @@ async def delete_document_and_entities(uri=Form(),
467469 graph = create_graph_database_connection (uri , userName , password , database )
468470 graphDb_data_Access = graphDBdataAccess (graph )
469471 result , files_list_size = await asyncio .to_thread (graphDb_data_Access .delete_file_from_graph , filenames , source_types , deleteEntities , MERGED_DIR , uri )
470- entities_count = result [0 ]['deletedEntities' ] if 'deletedEntities' in result [0 ] else 0
471- message = f"Deleted { files_list_size } documents with { entities_count } entities from database"
472+ # entities_count = result[0]['deletedEntities'] if 'deletedEntities' in result[0] else 0
473+ message = f"Deleted { files_list_size } documents with entities from database"
472474 json_obj = {'api_name' :'delete_document_and_entities' ,'db_url' :uri , 'logging_time' : formatted_time (datetime .now (timezone .utc ))}
473475 logger .log_struct (json_obj )
474476 return create_api_response ('Success' ,message = message )
0 commit comments