From f3897846cb54b8d0a58981a20ddf8b7072c8fb2d Mon Sep 17 00:00:00 2001
From: nirs123 <nicolas.foussard@etudiant.univ-lr.fr>
Date: Fri, 26 Jan 2024 09:33:56 +0100
Subject: [PATCH] Update requetes elastic + main.py et Fix storeDataBulk

---
 elasticUtils.py     | 2 +-
 main.py             | 8 ++++++--
 requetes-elastic.md | 4 ++++
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/elasticUtils.py b/elasticUtils.py
index 60e1c1b..e3afac0 100644
--- a/elasticUtils.py
+++ b/elasticUtils.py
@@ -2,7 +2,7 @@ import json
 import requests
 
 def storeDataBulk() -> None:
-    with open('/dataset_new/propre.json', encoding="utf-8") as f:
+    with open('dataset_new/propre.json', encoding="utf-8") as f:
         
         bulk_data = ""
         data = json.load(f)
diff --git a/main.py b/main.py
index 5a25614..a0a3239 100644
--- a/main.py
+++ b/main.py
@@ -2,6 +2,10 @@ from elasticUtils import *
 from dataUtils import *
 
 if __name__ == "__main__":
-    tmp = tenBestAnswers("Quels sont les musées à voir ?")
+    pass
+    # storeDataBulk()
 
-    print(tmp)
\ No newline at end of file
+
+    # tmp = tenBestAnswers("Quels sont les musées à voir ?")
+
+    # print(tmp)
\ No newline at end of file
diff --git a/requetes-elastic.md b/requetes-elastic.md
index bd42de6..5c9978b 100644
--- a/requetes-elastic.md
+++ b/requetes-elastic.md
@@ -78,6 +78,10 @@ curl -X PUT "localhost:9200/raccourci?pretty" -H 'Content-Type: application/json
   },
   "mappings": {
     "properties": {
+      "title": {
+        "type": "text",
+        "analyzer": "french"
+      },
       "content": {
         "type": "text",
         "analyzer": "french"
-- 
GitLab