lovrodoe
lovrodoe

Reputation: 502

Elasticsearch field as searchable/not searchable

I have a situation where I'd sometimes turn off whether a field is searchable or not, and for that I tried to use index when posting to mapping.

{
    "properties": {
        "test": {
            "type": "text",
            "index": false
        }
    }
}

I've found that it's not possible to switch index to true later once it's set to false. Same goes for store. Is there any other way to achieve this?

Upvotes: 0

Views: 327

Answers (1)

Val
Val

Reputation: 217544

Nope, it's generally not possible to modify a mapping once it's been created. There are just a few settings that you can change but not the ones you mentioned.

Upvotes: 1

Related Questions