Confusing situation with the class PreBuiltTransportClient

Elasticsearch version: 5.4.0

Plugins installed: []

JVM version (java -version):

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

OS version (uname -a if on a Unix-like system):

Linux ideapad 3.16.0-0.bpo.4-amd64 #1 SMP Debian 3.16.7-ckt11-1~bpo70+1 (2015-06-08) x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:

There's a confusing situation with a package name (at least for me)

Is it: package org.elasticsearch.transport.client;

Or: package org.elasticsearch.client.transport;

In the source at: https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/client/transport/TransportClient.java

I see: package org.elasticsearch.client.transport;

In the sources from mvnrepository.com y get: package org.elasticsearch.client.transport;

Steps to reproduce:

  1. Include "org.elasticsearch.client" % "transport" % "5.1.1" withSources() in a built.sbt file.

  2. To instantiate the class PreBuiltTransportClient

import org.elasticsearch.client.transport._ as the name of the dependency sugests

  1. Try to instantiate it and get an error

[error] /path/to/file:25: not found: type PreBuiltTransportClient
[error] val client = new PreBuiltTransportClient(settings)
[error] ^

  1. Checking the source code in my local .ivy repository the class begins with

package org.elasticsearch.transport.client;

  1. Importing as the package in my local repository makes the error go away.

import org.elasticsearch.transport.client._

If it's something I misunderstood please be so kind to explain me.

Moving this to the main Elasticsearch forum

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