# Massive Java client API breakages in master

**URL:** <https://discuss.elastic.co/t/massive-java-client-api-breakages-in-master/10854>\
**Category:** Elasticsearch\
**Created:** [February 22, 2013, 11:29am UTC](https://discuss.elastic.co/t/massive-java-client-api-breakages-in-master/10854 "2013-02-22T11:29:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Klishin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_klishin/32/1062_2.png) [@Michael\_Klishin](https://discuss.elastic.co/u/Michael_Klishin)\
**Post date:** [February 22, 2013, 11:29am UTC](https://discuss.elastic.co/t/massive-java-client-api-breakages-in-master/10854/1 "2013-02-22T11:29:13Z")

</div>

Dear ElasticSearch maintainers, please reconsider the following changes:

> <https://github.com/elastic/elasticsearch/commit/cc83c2f848be69a77f1275fe1ff5363dcdd4c955>

Not only they break _every single app_ that uses the Java client, it  
also makes a lot of documentation and code examples around the Web  
irrelevant, all at once.

I won't comment on whether sticking to beans-like setters and getters  
in a DSL is a good idea but completely breaking existing projects and  
making a lot  
of examples irrelevant doesn't sound like a price worth paying for  
more standard method names.

I believe that the old API should be kept around for at least a few  
releases, marked as @deprecated, but not removed overnight.

## Thank you.

MK

> **[michaelklishin (Michael Klishin)](https://github.com/michaelklishin)**
>
> michaelklishin has 155 repositories available. Follow their code on GitHub.

  
[http://twitter.com/michaelklishin](http://twitter.com/michaelklishin)

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [February 22, 2013, 12:04pm UTC](https://discuss.elastic.co/t/massive-java-client-api-breakages-in-master/10854/2 "2013-02-22T12:04:28Z")

</div>

I'm actually in favor of this change. Adding is/get/set prefix is merely a  
breaking change, it will just throw some compilation errors.

I concur they should have went through a deprecation phase, but as both  
options were already there for most usages, I think once the change was  
made its OK to leave it that way

On Fri, Feb 22, 2013 at 1:29 PM, Michael Klishin \<  
[michael.s.klishin@gmail.com](mailto:michael.s.klishin@gmail.com)\> wrote:

> Dear Elasticsearch maintainers, please reconsider the following changes:
> 
> [refactoring getter/setters · elastic/elasticsearch@cc83c2f · GitHub](https://github.com/elasticsearch/elasticsearch/commit/cc83c2f848be69a77f1275fe1ff5363dcdd4c955)
> 
> Not only they break _every single app_ that uses the Java client, it  
> also makes a lot of documentation and code examples around the Web  
> irrelevant, all at once.
> 
> I won't comment on whether sticking to beans-like setters and getters  
> in a DSL is a good idea but completely breaking existing projects and  
> making a lot  
> of examples irrelevant doesn't sound like a price worth paying for  
> more standard method names.
> 
> I believe that the old API should be kept around for at least a few  
> releases, marked as @deprecated, but not removed overnight.
> 
> ## Thank you.
> 
> MK
> 
> [michaelklishin (Michael Klishin) · GitHub](http://github.com/michaelklishin)  
> [http://twitter.com/michaelklishin](http://twitter.com/michaelklishin)
> 
> --  
> 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).  
> 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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Oliver\_B\_Fischer](https://avatars.discourse-cdn.com/v4/letter/o/f04885/32.png) [@Oliver\_B\_Fischer](https://discuss.elastic.co/u/Oliver_B_Fischer)\
**Post date:** [February 22, 2013, 1:15pm UTC](https://discuss.elastic.co/t/massive-java-client-api-breakages-in-master/10854/3 "2013-02-22T13:15:24Z")

</div>

Michael,

you are absolutely right. Such easy refactorings in a public API should  
never break depending clients. That is the reason why we have the  
@deprecated stuff.

Bye,

Oliver

On 02/22/2013 12:29 PM, Michael Klishin wrote:

> Dear Elasticsearch maintainers, please reconsider the following changes:
> 
> [refactoring getter/setters · elastic/elasticsearch@cc83c2f · GitHub](https://github.com/elasticsearch/elasticsearch/commit/cc83c2f848be69a77f1275fe1ff5363dcdd4c955)
> 
> Not only they break _every single app_ that uses the Java client, it  
> also makes a lot of documentation and code examples around the Web  
> irrelevant, all at once.
> 
> I won't comment on whether sticking to beans-like setters and getters  
> in a DSL is a good idea but completely breaking existing projects and  
> making a lot  
> of examples irrelevant doesn't sound like a price worth paying for  
> more standard method names.
> 
> I believe that the old API should be kept around for at least a few  
> releases, marked as @deprecated, but not removed overnight.
> 
> ## Thank you.
> 
> MK
> 
> [michaelklishin (Michael Klishin) · GitHub](http://github.com/michaelklishin)  
> [http://twitter.com/michaelklishin](http://twitter.com/michaelklishin)
> 
> --  
> 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).  
> 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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 22, 2013, 2:23pm UTC](https://discuss.elastic.co/t/massive-java-client-api-breakages-in-master/10854/4 "2013-02-22T14:23:52Z")

</div>

Hey, I commented on the issue itself. The idea was to remove the duplication of getXXX and xxx methods we have on response objects, and just stay with getXXX, and this is what we did. We went a step further and changed the XXXRequest classes to use setters, which we shouldn't have (the XXXRequestBuilders are there to use the setter notion). We will revert back the XXXRequest changes.

On Feb 22, 2013, at 2:15 PM, Oliver B. Fischer [mailsink@swe-blog.net](mailto:mailsink@swe-blog.net) wrote:

> Michael,
> 
> you are absolutely right. Such easy refactorings in a public API should never break depending clients. That is the reason why we have the @deprecated stuff.
> 
> Bye,
> 
> Oliver
> 
> On 02/22/2013 12:29 PM, Michael Klishin wrote:
> 
> > Dear Elasticsearch maintainers, please reconsider the following changes:
> > 
> > [refactoring getter/setters · elastic/elasticsearch@cc83c2f · GitHub](https://github.com/elasticsearch/elasticsearch/commit/cc83c2f848be69a77f1275fe1ff5363dcdd4c955)
> > 
> > Not only they break _every single app_ that uses the Java client, it  
> > also makes a lot of documentation and code examples around the Web  
> > irrelevant, all at once.
> > 
> > I won't comment on whether sticking to beans-like setters and getters  
> > in a DSL is a good idea but completely breaking existing projects and  
> > making a lot  
> > of examples irrelevant doesn't sound like a price worth paying for  
> > more standard method names.
> > 
> > I believe that the old API should be kept around for at least a few  
> > releases, marked as @deprecated, but not removed overnight.
> > 
> > ## Thank you.
> > 
> > MK
> > 
> > [michaelklishin (Michael Klishin) · GitHub](http://github.com/michaelklishin)  
> > [http://twitter.com/michaelklishin](http://twitter.com/michaelklishin)
> > 
> > --  
> > 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).  
> > 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).  
> 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).  
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:50am UTC](https://discuss.elastic.co/t/massive-java-client-api-breakages-in-master/10854/5 "2017-07-06T02:50:04Z")

</div>


