Răsfoiți Sursa

Fix incorrect use of "updateable" flag in synonyms documentation (#120866) (#121046)

Co-authored-by: Amine GANI <gani.amine@gmail.com>
Co-authored-by: Amine GANI <amine.gani@adelean.com>
Carlos Delgado 8 luni în urmă
părinte
comite
e807b443e5

+ 22 - 2
docs/reference/search/search-your-data/search-with-synonyms.asciidoc

@@ -145,15 +145,35 @@ The following example adds `my_analyzer` as a search analyzer to the `title` fie
 
 [source,JSON]
 ----
+{
   "mappings": {
     "properties": {
       "title": {
         "type": "text",
-        "search_analyzer": "my_analyzer",
-        "updateable": true
+        "search_analyzer": "my_analyzer"
+      }
+    }
+  },
+  "settings": {
+    "analysis": {
+      "analyzer": {
+        "my_analyzer": {
+          "tokenizer": "whitespace",
+          "filter": [
+            "synonyms_filter"
+          ]
+        }
+      },
+      "filter": {
+        "synonyms_filter": {
+          "type": "synonym",
+          "synonyms_path": "analysis/synonym-set.txt",
+          "updateable": true
+        }
       }
     }
   }
+}
 ----