ElasticSearch 5.4.3 and Java 7

Hi guys,

We have been using an old version of ELK and our customer has decided to migrate to ELK 5.4.3 but keeping Java 7 for the moment. (Migration to Java 8 is indeed planned, but Java 7 is going to be used for few year ahead).

Our dependency to ElasticSearch (query mechanism) is made via maven:

org.elasticsearch.client
transport
5.4.3

Our Java class relies on the following ElasticSearch classes:
import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.RangeQueryBuilder;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHitField;

Could you please advise how to make it work with Java 7?

Thanks in advance for your feedback.

Refs:

We don't support that mix of java and Elasticsearch, so the only real option is to upgrade java or not upgrade Elasticsearch.

In our project we are using ES 5.5 and open jdk 1.8 but in the same host our application is running on java 1.7. So I believe you can upgrade ES and use openjdk8 for ES only.

If you are using the REST API that should be OK, but if you are using the transport client I think client and server need to run the same Java version.

1 Like

Ok, indeed we are going to use REST API to be java version agnostic.

Thank you for your help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.