# \`.keyword\`counting against maximum number of fields?

**URL:** <https://discuss.elastic.co/t/keyword-counting-against-maximum-number-of-fields/209304>\
**Category:** Elasticsearch\
**Created:** [November 25, 2019, 12:52pm UTC](https://discuss.elastic.co/t/keyword-counting-against-maximum-number-of-fields/209304 "2019-11-25T12:52:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![widhalmt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/widhalmt/32/8237_2.png) [@widhalmt](https://discuss.elastic.co/u/widhalmt)\
**Post date:** [November 25, 2019, 12:52pm UTC](https://discuss.elastic.co/t/keyword-counting-against-maximum-number-of-fields/209304/1 "2019-11-25T12:52:01Z")

</div>

Hi,

I just wanted to ask if the the double indexed versions of `string` fields (as `text` and as `keyword`) do they count as 2 fields against the maximum count of fields which defaults to 1000?

So, if I just have events containing text fields, can I in fact only have 500 different fields per index or is it still 1000 without chaning the default?

Cheers,  
Thomas

---

<div class="post-metadata">

**Author:** ![widhalmt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/widhalmt/32/8237_2.png) [@widhalmt](https://discuss.elastic.co/u/widhalmt)\
**Post date:** [December 11, 2019, 4:05pm UTC](https://discuss.elastic.co/t/keyword-counting-against-maximum-number-of-fields/209304/2 "2019-12-11T16:05:47Z")

</div>

Hi,

I just built a testing environment and yes, a field of type `string` counts as two fields.

Here is what I built:

```auto
# for i in $(seq 1 1500); do for j in $(seq 1 $i) ; do echo -n "foo$j=bar " ; done ; echo ; done > /tmp/maximumfieldtest

```

(I used 1500 as maximum so that it will definitely break.)

I sent the output through the following:

```auto
input {
  file {
    path => "/tmp/maximumfieldtest"
    start_position => "beginning"
    sincedb_path => "/dev/null"
  }
}
filter {
  kv {}
}
output {
  elasticsearch {
    index => "maxmimumfield"
    hosts => ["http://127.0.0.1:9200"]
  }
}

```

And it indexed 495 events. So there seems to be 5 fields "overhead" (like `@timestamp`) and I can index 495 additional fields.

 ![maximumfield](https://us1.discourse-cdn.com/elastic/original/3X/5/c/5cfe80a757b663ea9eadadfe9f063ebf63de870c.png)

---

<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:** [January 8, 2020, 4:05pm UTC](https://discuss.elastic.co/t/keyword-counting-against-maximum-number-of-fields/209304/3 "2020-01-08T16:05:53Z")

</div>

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