# How to set fields “unsearchable” and “unaggregatable”

**URL:** <https://discuss.elastic.co/t/how-to-set-fields-unsearchable-and-unaggregatable/96413>\
**Category:** Elasticsearch\
**Created:** [August 9, 2017, 9:57am UTC](https://discuss.elastic.co/t/how-to-set-fields-unsearchable-and-unaggregatable/96413 "2017-08-09T09:57:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_ax](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@John\_ax](https://discuss.elastic.co/u/John_ax)\
**Post date:** [August 9, 2017, 9:57am UTC](https://discuss.elastic.co/t/how-to-set-fields-unsearchable-and-unaggregatable/96413/1 "2017-08-09T09:57:52Z")

</div>

Hi, I'm using Elasticsearch 5.5 and Kibana 5.5.after some google and test ,I stil had some questions:

### how can I mark `_index` and `_type` unaggreagable?

I noticed that if I have the template mapping:

```json
"type": "string",
"doc_values": false       

```

then the field is unaggreagable, hope to save the memory and increase the performance.  
however how can I mark `_index` and `_type` unaggreagable?

### how to mark fields unsearchable?

Q: if mark fields unsearchable,can es save the disk usage?  
Q2: how to mark fields unsearchable?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 6, 2017, 9:57am UTC](https://discuss.elastic.co/t/how-to-set-fields-unsearchable-and-unaggregatable/96413/2 "2017-09-06T09:57:59Z")

</div>

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