# Recommended maximum fields per index

**URL:** <https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388>\
**Category:** Elasticsearch\
**Created:** [May 12, 2011, 7:22am UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388 "2011-05-12T07:22:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![maho](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@maho](https://discuss.elastic.co/u/maho)\
**Post date:** [May 12, 2011, 7:22am UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/1 "2011-05-12T07:22:09Z")

</div>

Hi,

is there a maximum number of fields per index you should not exceed  
because performance issues?

In my case I have 10 types per index and 150 fields per type -  
summarized 1500 fields per index.

And secondly, is it possible to define type independed fields that  
apply all types to reduce the amount of fields per indes?

Thanks.

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [May 12, 2011, 8:06am UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/2 "2011-05-12T08:06:47Z")

</div>

Hi,

As for the second question you can simply use index templates:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

I am not sure about the impact of high number of document fields but I think  
that 1500 fields per index should ok (it probably gets down to the content  
of your data so you should try it and measure). Generally, Lucene is  
designed to allows a unique set of fields per document in one index.

Regards,  
Lukas

On Thu, May 12, 2011 at 9:22 AM, maho [mathias.hodler@gmail.com](mailto:mathias.hodler@gmail.com) wrote:

> Hi,
> 
> is there a maximum number of fields per index you should not exceed  
> because performance issues?
> 
> In my case I have 10 types per index and 150 fields per type -  
> summarized 1500 fields per index.
> 
> And secondly, is it possible to define type independed fields that  
> apply all types to reduce the amount of fields per indes?
> 
> Thanks.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 12, 2011, 8:58am UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/3 "2011-05-12T08:58:48Z")

</div>

In elasticsearch, a field named "x" in different types is considered the same field in Lucene. The number of fields affects the memory usage (for search) mainly. The option to store \_source means that you don't have to store each one and get all at once.  
On Thursday, May 12, 2011 at 11:06 AM, LukÃ¡Å¡ VlÄek wrote:

> Hi,
> 
> As for the second question you can simply use index templates: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-templates.html)
> 
> I am not sure about the impact of high number of document fields but I think that 1500 fields per index should ok (it probably gets down to the content of your data so you should try it and measure). Generally, Lucene is designed to allows a unique set of fields per document in one index.
> 
> Regards,  
> Lukas
> 
> On Thu, May 12, 2011 at 9:22 AM, maho [mathias.hodler@gmail.com](mailto:mathias.hodler@gmail.com) wrote:
> 
> > Hi,
> > 
> > is there a maximum number of fields per index you should not exceed  
> > because performance issues?
> > 
> > In my case I have 10 types per index and 150 fields per type -  
> > summarized 1500 fields per index.
> > 
> > And secondly, is it possible to define type independed fields that  
> > apply all types to reduce the amount of fields per indes?
> > 
> > Thanks.

---

<div class="post-metadata">

**Author:** ![maho](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@maho](https://discuss.elastic.co/u/maho)\
**Post date:** [May 12, 2011, 9:24am UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/4 "2011-05-12T09:24:47Z")

</div>

Hi Shay,

thats interesting... so you should not define fields with the same  
name but different data types in different index types?

On 12 Mai, 10:58, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> In elasticsearch, a field named "x" in different types is considered the same field in Lucene. The number of fields affects the memory usage (for search) mainly. The option to store \_source means that you don't have to store each one and get all at once.
> 
> On Thursday, May 12, 2011 at 11:06 AM, Lukáš Vlček wrote:
> 
> > Hi,
> 
> > As for the second question you can simply use index templates:[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-templa)...
> 
> > I am not sure about the impact of high number of document fields but I think that 1500 fields per index should ok (it probably gets down to the content of your data so you should try it and measure). Generally, Lucene is designed to allows a unique set of fields per document in one index.
> 
> > Regards,  
> > Lukas
> 
> > On Thu, May 12, 2011 at 9:22 AM, maho [mathias.hod...@gmail.com](mailto:mathias.hod...@gmail.com) wrote:
> > 
> > > Hi,
> 
> > > is there a maximum number of fields per index you should not exceed  
> > > because performance issues?
> 
> > > In my case I have 10 types per index and 150 fields per type -  
> > > summarized 1500 fields per index.
> 
> > > And secondly, is it possible to define type independed fields that  
> > > apply all types to reduce the amount of fields per indes?
> 
> > > Thanks.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 12, 2011, 9:26am UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/5 "2011-05-12T09:26:31Z")

</div>

Yes, that can lead to strange behavior, unless you make special care (in some features that support it) to use type\_name.field\_name. In general, its not recommended.  
On Thursday, May 12, 2011 at 12:24 PM, maho wrote:

> Hi Shay,
> 
> thats interesting... so you should not define fields with the same  
> name but different data types in different index types?
> 
> On 12 Mai, 10:58, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > In elasticsearch, a field named "x" in different types is considered the same field in Lucene. The number of fields affects the memory usage (for search) mainly. The option to store \_source means that you don't have to store each one and get all at once.
> > 
> > On Thursday, May 12, 2011 at 11:06 AM, LukÃ¡Å¡ VlÄek wrote:
> > 
> > > Hi,
> > 
> > > As for the second question you can simply use index templates:[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-templa)...
> > 
> > > I am not sure about the impact of high number of document fields but I think that 1500 fields per index should ok (it probably gets down to the content of your data so you should try it and measure). Generally, Lucene is designed to allows a unique set of fields per document in one index.
> > 
> > > Regards,  
> > > Lukas
> > 
> > > On Thu, May 12, 2011 at 9:22 AM, maho [mathias.hod...@gmail.com](mailto:mathias.hod...@gmail.com) wrote:
> > > 
> > > > Hi,
> > 
> > > > is there a maximum number of fields per index you should not exceed  
> > > > because performance issues?
> > 
> > > > In my case I have 10 types per index and 150 fields per type -  
> > > > summarized 1500 fields per index.
> > 
> > > > And secondly, is it possible to define type independed fields that  
> > > > apply all types to reduce the amount of fields per indes?
> > 
> > > > Thanks.

---

<div class="post-metadata">

**Author:** ![plaflamme](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@plaflamme](https://discuss.elastic.co/u/plaflamme)\
**Post date:** [May 12, 2011, 12:57pm UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/6 "2011-05-12T12:57:12Z")

</div>

Hi Shay,

Does this appear in the documentation? I looked quickly and didn't find  
anything that warned users from doing this. This may seem obvious to a  
developer but I don't think it is for users. Types "seem" to segment the  
index into independent portions, but in fact they are very closely related  
(much more so than it appears).

Should I open an issue for documenting this? I'd be glad to contribute some  
documentation also.

Philippe

On Thu, May 12, 2011 at 05:26, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> Yes, that can lead to strange behavior, unless you make special care (in  
> some features that support it) to use type\_name.field\_name. In general, its  
> not recommended.
> 
> On Thursday, May 12, 2011 at 12:24 PM, maho wrote:
> 
> Hi Shay,
> 
> thats interesting... so you should not define fields with the same  
> name but different data types in different index types?
> 
> On 12 Mai, 10:58, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> In elasticsearch, a field named "x" in different types is considered the  
> same field in Lucene. The number of fields affects the memory usage (for  
> search) mainly. The option to store \_source means that you don't have to  
> store each one and get all at once.
> 
> On Thursday, May 12, 2011 at 11:06 AM, Lukáš Vlček wrote:
> 
> Hi,
> 
> As for the second question you can simply use index templates:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-templa)...
> 
> I am not sure about the impact of high number of document fields but I  
> think that 1500 fields per index should ok (it probably gets down to the  
> content of your data so you should try it and measure). Generally, Lucene is  
> designed to allows a unique set of fields per document in one index.
> 
> Regards,  
> Lukas
> 
> On Thu, May 12, 2011 at 9:22 AM, maho [mathias.hod...@gmail.com](mailto:mathias.hod...@gmail.com) wrote:
> 
> Hi,
> 
> is there a maximum number of fields per index you should not exceed  
> because performance issues?
> 
> In my case I have 10 types per index and 150 fields per type -  
> summarized 1500 fields per index.
> 
> And secondly, is it possible to define type independed fields that  
> apply all types to reduce the amount of fields per indes?
> 
> Thanks.

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [May 12, 2011, 1:07pm UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/7 "2011-05-12T13:07:50Z")

</div>

Please go ahead Phillipe and open ticket, if you want to contribute some  
content that would be warmly welcome!  
Lukas

On Thu, May 12, 2011 at 2:57 PM, Philippe Laflamme \<  
[philippe.laflamme@obiba.org](mailto:philippe.laflamme@obiba.org)\> wrote:

> Hi Shay,
> 
> Does this appear in the documentation? I looked quickly and didn't find  
> anything that warned users from doing this. This may seem obvious to a  
> developer but I don't think it is for users. Types "seem" to segment the  
> index into independent portions, but in fact they are very closely related  
> (much more so than it appears).
> 
> Should I open an issue for documenting this? I'd be glad to contribute some  
> documentation also.
> 
> Philippe
> 
> On Thu, May 12, 2011 at 05:26, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:
> 
> > Yes, that can lead to strange behavior, unless you make special care (in  
> > some features that support it) to use type\_name.field\_name. In general, its  
> > not recommended.
> > 
> > On Thursday, May 12, 2011 at 12:24 PM, maho wrote:
> > 
> > Hi Shay,
> > 
> > thats interesting... so you should not define fields with the same  
> > name but different data types in different index types?
> > 
> > On 12 Mai, 10:58, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> > 
> > In elasticsearch, a field named "x" in different types is considered the  
> > same field in Lucene. The number of fields affects the memory usage (for  
> > search) mainly. The option to store \_source means that you don't have to  
> > store each one and get all at once.
> > 
> > On Thursday, May 12, 2011 at 11:06 AM, Lukáš Vlček wrote:
> > 
> > Hi,
> > 
> > As for the second question you can simply use index templates:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-templa)...
> > 
> > I am not sure about the impact of high number of document fields but I  
> > think that 1500 fields per index should ok (it probably gets down to the  
> > content of your data so you should try it and measure). Generally, Lucene is  
> > designed to allows a unique set of fields per document in one index.
> > 
> > Regards,  
> > Lukas
> > 
> > On Thu, May 12, 2011 at 9:22 AM, maho [mathias.hod...@gmail.com](mailto:mathias.hod...@gmail.com) wrote:
> > 
> > Hi,
> > 
> > is there a maximum number of fields per index you should not exceed  
> > because performance issues?
> > 
> > In my case I have 10 types per index and 150 fields per type -  
> > summarized 1500 fields per index.
> > 
> > And secondly, is it possible to define type independed fields that  
> > apply all types to reduce the amount of fields per indes?
> > 
> > Thanks.

---

<div class="post-metadata">

**Author:** ![plaflamme](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@plaflamme](https://discuss.elastic.co/u/plaflamme)\
**Post date:** [May 12, 2011, 1:17pm UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/8 "2011-05-12T13:17:20Z")

</div>

Done: [Document that field X in different types of an index should have same data type · Issue #927 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/927)

[https://github.com/elasticsearch/elasticsearch/issues/927](https://github.com/elasticsearch/elasticsearch/issues/927)I'd be happy to  
contribute the documentation for this, but I'd need to know what ES expects.  
Shay mentioned that they should have the same type. Is this the only  
recommendation/requirement? Should the mapping be identical or only  
compatible?

Philippe

On Thu, May 12, 2011 at 09:07, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Please go ahead Phillipe and open ticket, if you want to contribute some  
> content that would be warmly welcome!  
> Lukas
> 
> On Thu, May 12, 2011 at 2:57 PM, Philippe Laflamme \<  
> [philippe.laflamme@obiba.org](mailto:philippe.laflamme@obiba.org)\> wrote:
> 
> > Hi Shay,
> > 
> > Does this appear in the documentation? I looked quickly and didn't find  
> > anything that warned users from doing this. This may seem obvious to a  
> > developer but I don't think it is for users. Types "seem" to segment the  
> > index into independent portions, but in fact they are very closely related  
> > (much more so than it appears).
> > 
> > Should I open an issue for documenting this? I'd be glad to contribute  
> > some documentation also.
> > 
> > Philippe
> > 
> > On Thu, May 12, 2011 at 05:26, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:
> > 
> > > Yes, that can lead to strange behavior, unless you make special care  
> > > (in some features that support it) to use type\_name.field\_name. In general,  
> > > its not recommended.
> > > 
> > > On Thursday, May 12, 2011 at 12:24 PM, maho wrote:
> > > 
> > > Hi Shay,
> > > 
> > > thats interesting... so you should not define fields with the same  
> > > name but different data types in different index types?
> > > 
> > > On 12 Mai, 10:58, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> > > 
> > > In elasticsearch, a field named "x" in different types is considered the  
> > > same field in Lucene. The number of fields affects the memory usage (for  
> > > search) mainly. The option to store \_source means that you don't have to  
> > > store each one and get all at once.
> > > 
> > > On Thursday, May 12, 2011 at 11:06 AM, Lukáš Vlček wrote:
> > > 
> > > Hi,
> > > 
> > > As for the second question you can simply use index templates:  
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-templa)...
> > > 
> > > I am not sure about the impact of high number of document fields but I  
> > > think that 1500 fields per index should ok (it probably gets down to the  
> > > content of your data so you should try it and measure). Generally, Lucene is  
> > > designed to allows a unique set of fields per document in one index.
> > > 
> > > Regards,  
> > > Lukas
> > > 
> > > On Thu, May 12, 2011 at 9:22 AM, maho [mathias.hod...@gmail.com](mailto:mathias.hod...@gmail.com) wrote:
> > > 
> > > Hi,
> > > 
> > > is there a maximum number of fields per index you should not exceed  
> > > because performance issues?
> > > 
> > > In my case I have 10 types per index and 150 fields per type -  
> > > summarized 1500 fields per index.
> > > 
> > > And secondly, is it possible to define type independed fields that  
> > > apply all types to reduce the amount of fields per indes?
> > > 
> > > Thanks.

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [May 12, 2011, 2:02pm UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/9 "2011-05-12T14:02:23Z")

</div>

I haven't tried this myself but I would say that the fields must be of the  
same type.  
Couple of relevant email threads.  
[http://elasticsearch-users.115913.n3.nabble.com/Searching-across-types-tp1745420p1745420.html](http://elasticsearch-users.115913.n3.nabble.com/Searching-across-types-tp1745420p1745420.html)  
[http://elasticsearch-users.115913.n3.nabble.com/Mapping-namespace-problem-td2494252.html](http://elasticsearch-users.115913.n3.nabble.com/Mapping-namespace-problem-td2494252.html)

On Thu, May 12, 2011 at 3:17 PM, Philippe Laflamme \<  
[philippe.laflamme@obiba.org](mailto:philippe.laflamme@obiba.org)\> wrote:

> Done: [Document that field X in different types of an index should have same data type · Issue #927 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/927)
> 
> [https://github.com/elasticsearch/elasticsearch/issues/927](https://github.com/elasticsearch/elasticsearch/issues/927)I'd be happy  
> to contribute the documentation for this, but I'd need to know what ES  
> expects. Shay mentioned that they should have the same type. Is this the  
> only recommendation/requirement? Should the mapping be identical or only  
> compatible?
> 
> Philippe
> 
> On Thu, May 12, 2011 at 09:07, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:
> 
> > Please go ahead Phillipe and open ticket, if you want to contribute some  
> > content that would be warmly welcome!  
> > Lukas
> > 
> > On Thu, May 12, 2011 at 2:57 PM, Philippe Laflamme \<  
> > [philippe.laflamme@obiba.org](mailto:philippe.laflamme@obiba.org)\> wrote:
> > 
> > > Hi Shay,
> > > 
> > > Does this appear in the documentation? I looked quickly and didn't find  
> > > anything that warned users from doing this. This may seem obvious to a  
> > > developer but I don't think it is for users. Types "seem" to segment the  
> > > index into independent portions, but in fact they are very closely related  
> > > (much more so than it appears).
> > > 
> > > Should I open an issue for documenting this? I'd be glad to contribute  
> > > some documentation also.
> > > 
> > > Philippe
> > > 
> > > On Thu, May 12, 2011 at 05:26, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:
> > > 
> > > > Yes, that can lead to strange behavior, unless you make special care  
> > > > (in some features that support it) to use type\_name.field\_name. In general,  
> > > > its not recommended.
> > > > 
> > > > On Thursday, May 12, 2011 at 12:24 PM, maho wrote:
> > > > 
> > > > Hi Shay,
> > > > 
> > > > thats interesting... so you should not define fields with the same  
> > > > name but different data types in different index types?
> > > > 
> > > > On 12 Mai, 10:58, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> > > > 
> > > > In elasticsearch, a field named "x" in different types is considered the  
> > > > same field in Lucene. The number of fields affects the memory usage (for  
> > > > search) mainly. The option to store \_source means that you don't have to  
> > > > store each one and get all at once.
> > > > 
> > > > On Thursday, May 12, 2011 at 11:06 AM, Lukáš Vlček wrote:
> > > > 
> > > > Hi,
> > > > 
> > > > As for the second question you can simply use index templates:  
> > > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-templa)  
> > > > ...
> > > > 
> > > > I am not sure about the impact of high number of document fields but I  
> > > > think that 1500 fields per index should ok (it probably gets down to the  
> > > > content of your data so you should try it and measure). Generally, Lucene is  
> > > > designed to allows a unique set of fields per document in one index.
> > > > 
> > > > Regards,  
> > > > Lukas
> > > > 
> > > > On Thu, May 12, 2011 at 9:22 AM, maho [mathias.hod...@gmail.com](mailto:mathias.hod...@gmail.com) wrote:
> > > > 
> > > > Hi,
> > > > 
> > > > is there a maximum number of fields per index you should not exceed  
> > > > because performance issues?
> > > > 
> > > > In my case I have 10 types per index and 150 fields per type -  
> > > > summarized 1500 fields per index.
> > > > 
> > > > And secondly, is it possible to define type independed fields that  
> > > > apply all types to reduce the amount of fields per indes?
> > > > 
> > > > Thanks.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 12, 2011, 9:57pm UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/10 "2011-05-12T21:57:43Z")

</div>

The mappings are recommended to be the same. Its kindda in the middle now, I have started (way back) to try and support it better when explicitly specifying the type in relevant queries filters, but it does not work when they have different analyzers. And, in any case, you would need to explicitly specify the type, for example:

{ "term" : { "my\_type.my\_field" : "value" }}.

It does not work though when you execute a search on that type alone (/my\_index/my\_type/\_search), i.e., the typeness is not bubbled down.

Those are the two main issues that I can think that I are missing. But, even with that, things like facets will become problematic (since there can be only one "type" for that field when faceting on it). So, in any case, even with those issues "fixed", its recommended that they will have the same mapping (analyzer, type, and so on).  
On Thursday, May 12, 2011 at 4:17 PM, Philippe Laflamme wrote:

> Done: [Document that field X in different types of an index should have same data type · Issue #927 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/927)
> 
> I'd be happy to contribute the documentation for this, but I'd need to know what ES expects. Shay mentioned that they should have the same type. Is this the only recommendation/requirement? Should the mapping be identical or only compatible?
> 
> Philippe
> 
> On Thu, May 12, 2011 at 09:07, LukÃ¡Å¡ VlÄek [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:
> 
> > Please go ahead Phillipe and open ticket, if you want to contribute some content that would be warmly welcome!  
> > Lukas
> > 
> > On Thu, May 12, 2011 at 2:57 PM, Philippe Laflamme [philippe.laflamme@obiba.org](mailto:philippe.laflamme@obiba.org) wrote:
> > 
> > > Hi Shay,
> > > 
> > > Does this appear in the documentation? I looked quickly and didn't find anything that warned users from doing this. This may seem obvious to a developer but I don't think it is for users. Types "seem" to segment the index into independent portions, but in fact they are very closely related (much more so than it appears).
> > > 
> > > Should I open an issue for documenting this? I'd be glad to contribute some documentation also.
> > > 
> > > Philippe
> > > 
> > > On Thu, May 12, 2011 at 05:26, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:
> > > 
> > > > Yes, that can lead to strange behavior, unless you make special care (in some features that support it) to use type\_name.field\_name. In general, its not recommended.  
> > > > On Thursday, May 12, 2011 at 12:24 PM, maho wrote:
> > > > 
> > > > > Hi Shay,
> > > > > 
> > > > > thats interesting... so you should not define fields with the same  
> > > > > name but different data types in different index types?
> > > > > 
> > > > > On 12 Mai, 10:58, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> > > > > 
> > > > > > In elasticsearch, a field named "x" in different types is considered the same field in Lucene. The number of fields affects the memory usage (for search) mainly. The option to store \_source means that you don't have to store each one and get all at once.
> > > > > > 
> > > > > > On Thursday, May 12, 2011 at 11:06 AM, LukÃ¡Å¡ VlÄek wrote:
> > > > > > 
> > > > > > > Hi,
> > > > > > 
> > > > > > > As for the second question you can simply use index templates:[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-templa)...
> > > > > > > 
> > > > > > > I am not sure about the impact of high number of document fields but I think that 1500 fields per index should ok (it probably gets down to the content of your data so you should try it and measure). Generally, Lucene is designed to allows a unique set of fields per document in one index.
> > > > > > > 
> > > > > > > Regards,  
> > > > > > > Lukas
> > > > > > 
> > > > > > > On Thu, May 12, 2011 at 9:22 AM, maho [mathias.hod...@gmail.com](mailto:mathias.hod...@gmail.com) wrote:
> > > > > > > 
> > > > > > > > Hi,
> > > > > > 
> > > > > > > > is there a maximum number of fields per index you should not exceed  
> > > > > > > > because performance issues?
> > > > > > > > 
> > > > > > > > In my case I have 10 types per index and 150 fields per type -  
> > > > > > > > summarized 1500 fields per index.
> > > > > > 
> > > > > > > > And secondly, is it possible to define type independed fields that  
> > > > > > > > apply all types to reduce the amount of fields per indes?
> > > > > > 
> > > > > > > > Thanks.

---

<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:** [July 6, 2017, 4:06am UTC](https://discuss.elastic.co/t/recommended-maximum-fields-per-index/4388/11 "2017-07-06T04:06:21Z")

</div>


