Changed accessors when upgrading from 0.20.4->0.90.0.Beta1

Hi all,

I'm looking into upgrading our code from es versions 0.20.4 to 0.90.0.Beta1
for testing purposes.

I looked up the changes as per the
doc(http://www.elasticsearch.org/download/2013/02/26/0.90.0.Beta1.html) and
saw:

Refactoring accessors using only getters and setters (#2657)

For many of these accessors that changed, the old version still exists (for
deprecation, i guess?) e.g.:
GetResponse
exists() -> isExists()
CountResponse
count() -> getCount()
SearchResponse
hits() -> getHits()
ClusterHealthResponse
status() -> getStatus()

This means that i could easily go back to v0.20.4 from 0.90.0.Beta1 once
i update my code to use the alternative accessor.

One, however, that i don't see is:
BuldResponse
items() vs getItems()

This means that i can't easily switch between versions without code changes.

Is there are reason why some of the accessors have changed and not others?

Derry

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Derry,

Forgive me if I don't understand what you said.
I can't see old versions in repo:
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/get/GetResponse.java#L56
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/count/CountResponse.java#L51
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/search/SearchResponse.java#L91
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java#L119

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/bulk/BulkResponse.java#L92

Where do you see old getters?

Thanks

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 20 mars 2013 à 16:13, Derry O' Sullivan derryos@gmail.com a écrit :

Hi all,

I'm looking into upgrading our code from es versions 0.20.4 to 0.90.0.Beta1 for testing purposes.

I looked up the changes as per the doc(http://www.elasticsearch.org/download/2013/02/26/0.90.0.Beta1.html) and saw:

Refactoring accessors using only getters and setters (#2657)

For many of these accessors that changed, the old version still exists (for deprecation, i guess?) e.g.:
GetResponse
exists() -> isExists()
CountResponse
count() -> getCount()
SearchResponse
hits() -> getHits()
ClusterHealthResponse
status() -> getStatus()

This means that i could easily go back to v0.20.4 from 0.90.0.Beta1 once i update my code to use the alternative accessor.

One, however, that i don't see is:
BuldResponse
items() vs getItems()

This means that i can't easily switch between versions without code changes.

Is there are reason why some of the accessors have changed and not others?

Derry

--
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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.

Sorry, it seems that my project had not cleaned out properly!

I was updating my pom and moving from 0.20.4->0.90.0.Beta1 and back and
didn't see compilation issues even after a clean compile. Now i have
restarted eclipse, forced a clean maven update and can't find the old
methods.

Sorry again for false alarm,

Derry

On Wednesday, 20 March 2013 17:32:03 UTC, David Pilato wrote:

Hi Derry,

Forgive me if I don't understand what you said.
I can't see old versions in repo:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/get/GetResponse.java#L56

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/count/CountResponse.java#L51

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/search/SearchResponse.java#L91

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java#L119

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/bulk/BulkResponse.java#L92

Where do you see old getters?

Thanks

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 20 mars 2013 à 16:13, Derry O' Sullivan <der...@gmail.com <javascript:>>
a écrit :

Hi all,

I'm looking into upgrading our code from es versions 0.20.4 to
0.90.0.Beta1 for testing purposes.

I looked up the changes as per the doc(
http://www.elasticsearch.org/download/2013/02/26/0.90.0.Beta1.html) and
saw:

Refactoring accessors using only getters and setters (#2657)

For many of these accessors that changed, the old version still exists
(for deprecation, i guess?) e.g.:
GetResponse
exists() -> isExists()
CountResponse
count() -> getCount()
SearchResponse
hits() -> getHits()
ClusterHealthResponse
status() -> getStatus()

This means that i could easily go back to v0.20.4 from 0.90.0.Beta1 once
i update my code to use the alternative accessor.

One, however, that i don't see is:
BuldResponse
items() vs getItems()

This means that i can't easily switch between versions without code
changes.

Is there are reason why some of the accessors have changed and not others?

Derry

--
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 <javascript:>.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.