Why disabling _field_names doesn't reduce index size?

I'm trying to strip down my index. I don't gonna use exists queries so I don't need the stuff behind the _field_names field. I've rebuilt my index from scratch with _field_names: {enabled: false} in the mapping.

The only difference I see is term queries by the _field_names field return nothing now. But the index size is pretty the same.

I guess disabling the field only disables the ability to directly query for the field but it is still set and indexed behind the scenes. Am I right?

I had a look at the code and it doesn't look like we index the field names when you disable that. I wouldn't have spotted any bugs in my quick look though. I imagine that storying the field names isn't particularly expensive. I expect the difference is lost in the wash around the asynchronous indexing and merging behavior.

I forgot to mention I'm on elastic 2.4.4. Mby it matters.

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