Erdogan Alper
Erdogan Alper

Reputation: 135

Opensearch index mapping field value not searchable

I am new at Opensearch and using this code on DevTools to make media_image_thumbnail_url field not searchable but having error like index already exist.

PUT cars
    {
    "mappings" : {
          "properties" : {
            "fields" : {
              "properties" : {
                "media_image_thumbnail_url" : {
                  "type" : "text",
                  "fields" : {
                    "keyword" : {
                      "type" : "keyword",
                      "ignore_above" : 256
                    },
                    "enable":false
                  }
                }
              }
            }
          }
        }
    }

Upvotes: 0

Views: 1214

Answers (1)

Erdogan Alper
Erdogan Alper

Reputation: 135

This one solved my issue

PUT cars/_mappings
    {
      "properties" : {
        "fields" : {
          "properties" : {
            "media_image_thumbnail_url" : {
              "type" : "text",
              "fields": {
                "raw": {
                   "type": "text",
                   "index": "false"
                }
             }
            }
          }
        }
      }
    }

Upvotes: 0

Related Questions