# Could I remove \_type field?

**URL:** <https://discuss.elastic.co/t/could-i-remove-type-field/124934>\
**Category:** Elasticsearch\
**Created:** [March 21, 2018, 8:38am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934 "2018-03-21T08:38:55Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![f26227279](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/f26227279/32/21296_2.png) [@f26227279](https://discuss.elastic.co/u/f26227279)\
**Post date:** [March 21, 2018, 8:38am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/1 "2018-03-21T08:38:56Z")

</div>

Hi, due to the high loading, I want to remove the default field \_type, \_score, \_id.  
is it possible ? if can, how to do it?

thanks a lot.

---

<div class="post-metadata">

**Author:** ![Varan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varan/32/32120_2.png) [@Varan](https://discuss.elastic.co/u/Varan)\
**Post date:** [March 21, 2018, 8:44am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/2 "2018-03-21T08:44:23Z")

</div>

Either of those three are necessary for Elasticsearch to index (\_type) or to search (\_id, \_score) your data.  
I don't think it is possible.

---

<div class="post-metadata">

**Author:** ![f26227279](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/f26227279/32/21296_2.png) [@f26227279](https://discuss.elastic.co/u/f26227279)\
**Post date:** [March 21, 2018, 8:48am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/3 "2018-03-21T08:48:38Z")

</div>

ok, thanks for your reply 🙂

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 21, 2018, 8:50am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/4 "2018-03-21T08:50:54Z")

</div>

REmove from what? The search response?

---

<div class="post-metadata">

**Author:** ![f26227279](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/f26227279/32/21296_2.png) [@f26227279](https://discuss.elastic.co/u/f26227279)\
**Post date:** [March 21, 2018, 8:53am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/5 "2018-03-21T08:53:24Z")

</div>

from logstash. because I found my hard drive is too late to write data .

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 21, 2018, 9:07am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/6 "2018-03-21T09:07:41Z")

</div>

So you can't remove those fields. Note that `_score` is not stored on disk and just computed at search time.

I think you want to solve an issue but using the wrong way of doing so.  
May be explain what the problem is instead?

---

<div class="post-metadata">

**Author:** ![f26227279](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/f26227279/32/21296_2.png) [@f26227279](https://discuss.elastic.co/u/f26227279)\
**Post date:** [March 21, 2018, 9:18am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/7 "2018-03-21T09:18:24Z")

</div>

I store data through logstash into ES, and I found that the data can't write to ES in time, so there has drop flow.After I remove some fields which I don't need, and the collecting performance is better.that's why I want to remove the default field.  
maybe my hard drive isn't good enough, but it seems not bad.

```
hdparm -t --direct /dev/sda

/dev/sda:
 Timing O_DIRECT disk reads: 6524 MB in 3.00 seconds = 2174.35 MB/sec
```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 21, 2018, 9:20am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/8 "2018-03-21T09:20:32Z")

</div>

What does disk I/O and iowait look like while indexing? Have you [tuned your cluster for indexing speed](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/tune-for-indexing-speed.html#tune-for-indexing-speed)?

---

<div class="post-metadata">

**Author:** ![f26227279](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/f26227279/32/21296_2.png) [@f26227279](https://discuss.elastic.co/u/f26227279)\
**Post date:** [March 21, 2018, 9:29am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/9 "2018-03-21T09:29:46Z")

</div>

[root@10-255-254-24 ~]# hdparm -t --direct /dev/sda

/dev/sda:  
Timing O\_DIRECT disk reads: 7518 MB in 3.00 seconds = 2505.74 MB/sec  
[root@10-255-254-24 ~]# hdparm -t /dev/sda

/dev/sda:  
Timing buffered disk reads: 2360 MB in 3.03 seconds = 778.64 MB/sec

iowait is about 0.1

now the flow is half of the peak.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 21, 2018, 9:30am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/10 "2018-03-21T09:30:48Z")

</div>

What does `iostat -x` show?

Elasticsearch tends to read and write a lot of small files rather than a few large ones, so a performance test using large sequential reads and/or writes may not represent how Elasticsearch used disk I/O very well.

---

<div class="post-metadata">

**Author:** ![f26227279](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/f26227279/32/21296_2.png) [@f26227279](https://discuss.elastic.co/u/f26227279)\
**Post date:** [March 21, 2018, 9:34am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/11 "2018-03-21T09:34:23Z")

</div>

```
Linux 3.10.0-693.el7.x86_64 (10-255-254-24.privateip.tyc.edu.tw) 03/21/2018 _x86_64_ (8 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle
           0.84 0.92 0.48 0.02 0.00 97.74

Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.04 0.29 1.59 8.04 312.97 140.40 94.15 0.01 1.03 4.91 0.26 0.28 0.27
scd0 0.00 0.00 0.00 0.00 0.01 0.00 72.41 0.00 0.38 0.38 0.00 0.38 0.00
dm-0 0.00 0.00 0.28 0.23 15.77 3.24 75.36 0.00 2.92 5.20 0.14 0.94 0.05
dm-1 0.00 0.00 0.05 0.22 0.22 0.87 8.15 0.00 2.49 4.92 1.94 0.16 0.00
dm-2 0.00 0.00 0.97 7.89 126.20 136.28 59.26 0.01 0.91 6.16 0.26 0.24 0.22
```

---

<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:** [April 18, 2018, 9:34am UTC](https://discuss.elastic.co/t/could-i-remove-type-field/124934/12 "2018-04-18T09:34:38Z")

</div>

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