Field Mapping index false vs true

I am using Elastic 6.x...

Is there any reason to not just go with the default of "index" : true for field mappings? There are some fields that I don't believe I will need to perform a search on so my thought is set index to false, but is there any benefit other than just being explicit about what I want searchable vs. not?

Thanks in advance

The benefit of setting index to false is that Elasticsearch will not have to build an inverted index for that field when you index documents. As a result, indexing documents is going to be slightly faster. Also, because there will be no inverted index for that field persisted on disk, you will use less disk space.

4 Likes

Thanks, very helpful response.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.