# Spring-data elasticsearch support?

**URL:** <https://discuss.elastic.co/t/spring-data-elasticsearch-support/14895>\
**Category:** Elasticsearch\
**Created:** [December 16, 2013, 6:23pm UTC](https://discuss.elastic.co/t/spring-data-elasticsearch-support/14895 "2013-12-16T18:23:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andra\_Bennett](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@Andra\_Bennett](https://discuss.elastic.co/u/Andra_Bennett)\
**Post date:** [December 16, 2013, 6:23pm UTC](https://discuss.elastic.co/t/spring-data-elasticsearch-support/14895/1 "2013-12-16T18:23:12Z")

</div>

Hello,

I am using spring-data elastic search[https://github.com/spring-projects/spring-data-elasticsearch](https://github.com/spring-projects/spring-data-elasticsearch)to configure my node and index my data.

I'd like to know how to enable the timestamp feature for the indexing, and  
how to map it to a custom field.

Does anyone in the elasticsearch have experience with the spring-data  
elasticsearch library? Or this question better suited for the Spring forum.

Thanks,  
Andra

--  
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/3141bf8b-bd9e-43c8-afdb-3ffcf7fb53a5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3141bf8b-bd9e-43c8-afdb-3ffcf7fb53a5%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [December 16, 2013, 6:56pm UTC](https://discuss.elastic.co/t/spring-data-elasticsearch-support/14895/2 "2013-12-16T18:56:18Z")

</div>

I guess that you basically have to send a mapping.  
I think that once you have a Node you can get a client from it and push a mapping in Java, right?

I did not play yet with spring data project for ES but I will soon.  
As author of [https://github.com/dadoonet/spring-elasticsearch](https://github.com/dadoonet/spring-elasticsearch), I will probably do it like this with it.

Not sure it helps.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 16 déc. 2013 à 19:23, Andra Bennett [andrucu@gmail.com](mailto:andrucu@gmail.com) a écrit :

Hello,

I am using spring-data elastic search to configure my node and index my data.

I'd like to know how to enable the timestamp feature for the indexing, and how to map it to a custom field.

Does anyone in the elasticsearch have experience with the spring-data elasticsearch library? Or this question better suited for the Spring forum.

## Thanks, Andra

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/3141bf8b-bd9e-43c8-afdb-3ffcf7fb53a5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3141bf8b-bd9e-43c8-afdb-3ffcf7fb53a5%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_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/39758AD0-4E10-4018-927F-E080BC2B9A81%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/39758AD0-4E10-4018-927F-E080BC2B9A81%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Andra\_Bennett](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@Andra\_Bennett](https://discuss.elastic.co/u/Andra_Bennett)\
**Post date:** [December 18, 2013, 3:32pm UTC](https://discuss.elastic.co/t/spring-data-elasticsearch-support/14895/3 "2013-12-18T15:32:02Z")

</div>

Hi David,

I am able to push a mapping in Java, but I see how I can merge that with an  
externally defined mapping as you suggest below.

But, is the spring-elasticsearch library compatible with the elasticsearch  
spring-data library?

Thanks!  
Andra

On Monday, December 16, 2013 1:56:18 PM UTC-5, David Pilato wrote:

> I guess that you basically have to send a mapping.  
> I think that once you have a Node you can get a client from it and push a  
> mapping in Java, right?
> 
> I did not play yet with spring data project for ES but I will soon.  
> As author of [GitHub - dadoonet/spring-elasticsearch: Spring factories for elasticsearch](https://github.com/dadoonet/spring-elasticsearch), I will  
> probably do it like this with it.
> 
> Not sure it helps.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 16 déc. 2013 à 19:23, Andra Bennett \<[and...@gmail.com](mailto:and...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Hello,
> 
> I am using spring-data Elasticsearch[https://github.com/spring-projects/spring-data-elasticsearch](https://github.com/spring-projects/spring-data-elasticsearch)to configure my node and index my data.
> 
> I'd like to know how to enable the timestamp feature for the indexing, and  
> how to map it to a custom field.
> 
> Does anyone in the elasticsearch have experience with the spring-data  
> elasticsearch library? Or this question better suited for the Spring forum.
> 
> Thanks,  
> Andra
> 
> --  
> 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/3141bf8b-bd9e-43c8-afdb-3ffcf7fb53a5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3141bf8b-bd9e-43c8-afdb-3ffcf7fb53a5%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_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/98735908-1e4e-4c6c-9bc0-1a7f4eb5de5e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/98735908-1e4e-4c6c-9bc0-1a7f4eb5de5e%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![smhdiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smhdiu/32/1808_2.png) [@smhdiu](https://discuss.elastic.co/u/smhdiu)\
**Post date:** [December 18, 2013, 3:52pm UTC](https://discuss.elastic.co/t/spring-data-elasticsearch-support/14895/4 "2013-12-18T15:52:25Z")

</div>

Currently this feature is not supported. but looks very handy and useful  
feature.  
we will think about it soon.  
please check my latest reply at

> <https://github.com/spring-projects/spring-data-elasticsearch/issues/615>
>
> \*\*\[Andra Bennett\](https://jira.spring.io/secure/ViewProfile.jspa?name=abennet)\*\*… opened \*\*\[DATAES-41\](https://jira.spring.io/browse/DATAES-41?redirect=false)\*\* and commented
> 
> It is desirable to have a way to configure timestamp field mapping, compatible with the field mapping available from the domain model (ElasticSearchTemplate:putMapping).
> 
> Other than using the REST API for configuring mappings, not sure how I could go about this.
> I was pointed to a new resource (https://github.com/dadoonet/spring-elasticsearch) for configuring elasticsearch factories in the spring config, but that doesn't seem to be fully integrated with the elasticsearch spring data project yet.
> 
> Please advise if there are any other options. How can TimestampFieldMapper be used with the spring-data configuration for elastic search, for example?
> 
> Thanks!
> 
> 
> \---
> 
> \*\*Attachments:\*\*
> \- \[648-375.pdf\](https://jira.spring.io/secure/attachment/26990/648-375.pdf) (\_391.21 kB\_)
> \- \[648-385.pdf\](https://jira.spring.io/secure/attachment/26991/648-385.pdf) (\_392.68 kB\_)
> \- \[650-032.pdf\](https://jira.spring.io/secure/attachment/26992/650-032.pdf) (\_395.70 kB\_)
> \- \[650-042.pdf\](https://jira.spring.io/secure/attachment/26993/650-042.pdf) (\_400.64 kB\_)
> \- \[650-059.pdf\](https://jira.spring.io/secure/attachment/26994/650-059.pdf) (\_396.74 kB\_)
> \- \[650-082.pdf\](https://jira.spring.io/secure/attachment/26995/650-082.pdf) (\_401.06 kB\_)
> \- \[650-127.pdf\](https://jira.spring.io/secure/attachment/26996/650-127.pdf) (\_378.23 kB\_)
> \- \[650-128.pdf\](https://jira.spring.io/secure/attachment/26997/650-128.pdf) (\_375.72 kB\_)
> \- \[650-148.pdf\](https://jira.spring.io/secure/attachment/26998/650-148.pdf) (\_374.46 kB\_)
> \- \[650-159.pdf\](https://jira.spring.io/secure/attachment/26999/650-159.pdf) (\_374.32 kB\_)
> \- \[650-281.pdf\](https://jira.spring.io/secure/attachment/27000/650-281.pdf) (\_395.47 kB\_)
> \- \[650-293.pdf\](https://jira.spring.io/secure/attachment/27001/650-293.pdf) (\_421.06 kB\_)
> \- \[650-296.pdf\](https://jira.spring.io/secure/attachment/27002/650-296.pdf) (\_431.49 kB\_)
> \- \[650-393.pdf\](https://jira.spring.io/secure/attachment/27003/650-393.pdf) (\_379.14 kB\_)
> \- \[650-472.pdf\](https://jira.spring.io/secure/attachment/27004/650-472.pdf) (\_374.63 kB\_)
> \- \[650-474.pdf\](https://jira.spring.io/secure/attachment/27005/650-474.pdf) (\_407.07 kB\_)
> \- \[650-575.pdf\](https://jira.spring.io/secure/attachment/27006/650-575.pdf) (\_376.90 kB\_)
> \- \[650-663.pdf\](https://jira.spring.io/secure/attachment/27007/650-663.pdf) (\_421.61 kB\_)
> \- \[650-752.pdf\](https://jira.spring.io/secure/attachment/27008/650-752.pdf) (\_408.50 kB\_)
> \- \[650-754.pdf\](https://jira.spring.io/secure/attachment/27009/650-754.pdf) (\_423.68 kB\_)
> 
> 0 votes, 5 watchers

HTH  
Mohsin

On Wednesday, 18 December 2013 15:32:02 UTC, Andra Bennett wrote:

> Hi David,
> 
> I am able to push a mapping in Java, but I see how I can merge that with  
> an externally defined mapping as you suggest below.
> 
> But, is the spring-elasticsearch library compatible with the elasticsearch  
> spring-data library?
> 
> Thanks!  
> Andra
> 
> On Monday, December 16, 2013 1:56:18 PM UTC-5, David Pilato wrote:
> 
> > I guess that you basically have to send a mapping.  
> > I think that once you have a Node you can get a client from it and push a  
> > mapping in Java, right?
> > 
> > I did not play yet with spring data project for ES but I will soon.  
> > As author of [GitHub - dadoonet/spring-elasticsearch: Spring factories for elasticsearch](https://github.com/dadoonet/spring-elasticsearch), I will  
> > probably do it like this with it.
> > 
> > Not sure it helps.
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 16 déc. 2013 à 19:23, Andra Bennett [and...@gmail.com](mailto:and...@gmail.com) a écrit :
> > 
> > Hello,
> > 
> > I am using spring-data Elasticsearch[https://github.com/spring-projects/spring-data-elasticsearch](https://github.com/spring-projects/spring-data-elasticsearch)to configure my node and index my data.
> > 
> > I'd like to know how to enable the timestamp feature for the indexing,  
> > and how to map it to a custom field.
> > 
> > Does anyone in the elasticsearch have experience with the spring-data  
> > elasticsearch library? Or this question better suited for the Spring forum.
> > 
> > Thanks,  
> > Andra
> > 
> > --  
> > 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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/3141bf8b-bd9e-43c8-afdb-3ffcf7fb53a5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3141bf8b-bd9e-43c8-afdb-3ffcf7fb53a5%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_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/5b77905a-5c08-4e1b-9653-3aa8b3f43c2c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5b77905a-5c08-4e1b-9653-3aa8b3f43c2c%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:00am UTC](https://discuss.elastic.co/t/spring-data-elasticsearch-support/14895/5 "2017-07-06T02:00:21Z")

</div>


