# Help needed for dynamic field creation after index creation

**URL:** <https://discuss.elastic.co/t/help-needed-for-dynamic-field-creation-after-index-creation/21593>\
**Category:** Elasticsearch\
**Created:** [January 12, 2015, 9:17pm UTC](https://discuss.elastic.co/t/help-needed-for-dynamic-field-creation-after-index-creation/21593 "2015-01-12T21:17:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bvnagaraju](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bvnagaraju](https://discuss.elastic.co/u/bvnagaraju)\
**Post date:** [January 12, 2015, 9:17pm UTC](https://discuss.elastic.co/t/help-needed-for-dynamic-field-creation-after-index-creation/21593/1 "2015-01-12T21:17:06Z")

</div>

I have given my document structure for the time of ingestion. My  
requirement is to create the schema mapping for only the particular set of  
fixed fields at the time of index creation itself, and to further update  
the schema mapping, whenever a new dynamic field is established in my  
system.

Could you please validate, if this is possible with my document type and  
its placement. Is it achievable with 1 single type in the document. I could  
not find the appropriate documentation which can answer my query. Please  
help out.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [January 12, 2015, 9:28pm UTC](https://discuss.elastic.co/t/help-needed-for-dynamic-field-creation-after-index-creation/21593/2 "2015-01-12T21:28:13Z")

</div>

What did you try so far? I mean that dynamic mapping is a default core feature of elasticsearch. What does not work for you?

David

> Le 12 janv. 2015 à 22:17, buddarapu nagaraju [budda08nitt@gmail.com](mailto:budda08nitt@gmail.com) a écrit :
> 
> I have given my document structure for the time of ingestion. My requirement is to create the schema mapping for only the particular set of fixed fields at the time of index creation itself, and to further update the schema mapping, whenever a new dynamic field is established in my system.
> 
> Could you please validate, if this is possible with my document type and its placement. Is it achievable with 1 single type in the document. I could not find the appropriate documentation which can answer my query. Please help out.
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/E850F119-76A8-4DCE-B1CF-6D74A1877DA6%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/E850F119-76A8-4DCE-B1CF-6D74A1877DA6%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![bvnagaraju](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bvnagaraju](https://discuss.elastic.co/u/bvnagaraju)\
**Post date:** [January 14, 2015, 9:44am UTC](https://discuss.elastic.co/t/help-needed-for-dynamic-field-creation-after-index-creation/21593/3 "2015-01-14T09:44:42Z")

</div>

Hi David,

We have below document structure

Document  
{  
Author,  
Parent,  
FamilyId,  
Field3,  
Field4,  
Field5,  
List DynamicFields;  
}

In my system I know what are the static fields so defined them as a  
properties using nest annotations .

Now there are some dynamic fields which can be created by user at any point  
after index creation and these field and values am having in DynamicFields  
property .

Now my question is how to handle the field mapping in index for new dynamic  
field ?

Does the key in dynamic fields property inferred when ingestion going on ?

Please help me in understanding this conceptually

Regards,  
Nagaraju  
On Monday, 12 January 2015 16:28:28 UTC-5, David Pilato wrote:

> What did you try so far? I mean that dynamic mapping is a default core  
> feature of elasticsearch. What does not work for you?
> 
> David
> 
> Le 12 janv. 2015 à 22:17, buddarapu nagaraju \<[budda...@gmail.com](mailto:budda...@gmail.com)  
> \<javascript:\>\> a écrit :
> 
> I have given my document structure for the time of ingestion. My  
> requirement is to create the schema mapping for only the particular set of  
> fixed fields at the time of index creation itself, and to further update  
> the schema mapping, whenever a new dynamic field is established in my  
> system.
> 
> Could you please validate, if this is possible with my document type and  
> its placement. Is it achievable with 1 single type in the document. I could  
> not find the appropriate documentation which can answer my query. Please  
> help out.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/009cb227-ef09-4313-b857-f172fb570c21%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/009cb227-ef09-4313-b857-f172fb570c21%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [January 14, 2015, 11:13am UTC](https://discuss.elastic.co/t/help-needed-for-dynamic-field-creation-after-index-creation/21593/4 "2015-01-14T11:13:50Z")

</div>

I’m not sure I understand what your concern is.  
Does this not work for you? May be it’s a question more related to Nest? As I’m not a .Net developper, I’m afraid I can’t answer.

If you can explain what your concern is using JSON documents, I could probably comment.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 14 janv. 2015 à 10:44, buddarapu nagaraju [budda08nitt@gmail.com](mailto:budda08nitt@gmail.com) a écrit :
> 
> Hi David,
> 
> We have below document structure
> 
> Document  
> {  
> Author,  
> Parent,  
> FamilyId,  
> Field3,  
> Field4,  
> Field5,  
> List DynamicFields;  
> }
> 
> In my system I know what are the static fields so defined them as a properties using nest annotations .
> 
> Now there are some dynamic fields which can be created by user at any point after index creation and these field and values am having in DynamicFields property .
> 
> Now my question is how to handle the field mapping in index for new dynamic field ?
> 
> Does the key in dynamic fields property inferred when ingestion going on ?
> 
> Please help me in understanding this conceptually
> 
> Regards,  
> Nagaraju  
> On Monday, 12 January 2015 16:28:28 UTC-5, David Pilato wrote:  
> What did you try so far? I mean that dynamic mapping is a default core feature of elasticsearch. What does not work for you?
> 
> David
> 
> Le 12 janv. 2015 à 22:17, buddarapu nagaraju \<[budda...@gmail.com](mailto:budda...@gmail.com) \<javascript:\>\> a écrit :
> 
> > I have given my document structure for the time of ingestion. My requirement is to create the schema mapping for only the particular set of fixed fields at the time of index creation itself, and to further update the schema mapping, whenever a new dynamic field is established in my system.
> > 
> > Could you please validate, if this is possible with my document type and its placement. Is it achievable with 1 single type in the document. I could not find the appropriate documentation which can answer my query. Please help out.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/80626aec-7f34-4c8f-9649-7dc096ac8cfb%40googlegroups.com?utm_medium=email&utm_source=footer).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/009cb227-ef09-4313-b857-f172fb570c21%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/009cb227-ef09-4313-b857-f172fb570c21%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/009cb227-ef09-4313-b857-f172fb570c21%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/009cb227-ef09-4313-b857-f172fb570c21%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0840C32F-2F3D-4277-92EB-968811BFA460%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/0840C32F-2F3D-4277-92EB-968811BFA460%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:39am UTC](https://discuss.elastic.co/t/help-needed-for-dynamic-field-creation-after-index-creation/21593/5 "2017-07-06T00:39:05Z")

</div>


