Where do I disable _source field?

I have to disable _source: false
But I don't where file can store my _source: false.
please help me.

In the index mapping. See _source field | Elasticsearch Guide [8.13] | Elastic

1 Like

Before doing this, please make sure you are aware and comfortable with the impacts of disabling _source and the restrictions that come with it.

1 Like

I think to ask my question again, Suppose I have the psude code:

GET /_search
{
    "_source": false,
    "query" : {
        "term" : { "user" : "kimchy" }
    }
}

Where can I store it?

Did you look at the links provided?

Yes I read them.Unfortunately I didn't find location of storing _source configuration file.

As described in the docs, you need to set this in the index mappings, either explicitly when you create the index or through an index template. This means that you may need to reindex your data.