File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
supporting-blog-content/local-rag-with-lightweight-elasticsearch Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def setup_index():
9191 print (f"❌ Error creating index: { str (e )} " )
9292
9393
94- def build_documents (dataset_folder , index_name ):
94+ def load_documents (dataset_folder , index_name ):
9595 for filename in os .listdir (dataset_folder ):
9696 if filename .endswith (".txt" ):
9797 filepath = os .path .join (dataset_folder , filename )
@@ -109,9 +109,7 @@ def index_documents():
109109 try :
110110 start_time = time .time ()
111111
112- success , _ = helpers .bulk (
113- es_client , build_documents (DATASET_FOLDER , INDEX_NAME )
114- )
112+ success , _ = helpers .bulk (es_client , load_documents (DATASET_FOLDER , INDEX_NAME ))
115113
116114 end_time = time .time ()
117115 bulk_latency = (end_time - start_time ) * 1000 # ms
You can’t perform that action at this time.
0 commit comments