Create index java API


(Jürgen kartnaller) #1

I want to create an index using the Java API.

I'm using a TransportClient and want to create a new Index, what is the Java
API to do this?

client.prepareIndex can't be used for this.

Thanks in advance
Jürgen


(Jürgen kartnaller) #2

Ok, got it:

client.admin().indices().create(new
CreateIndexRequest(indexname)).actionGet();

Sorry for the noise.

On Thu, Aug 25, 2011 at 9:01 PM, Jürgen kartnaller <
juergen.kartnaller@gmail.com> wrote:

I want to create an index using the Java API.

I'm using a TransportClient and want to create a new Index, what is the
Java API to do this?

client.prepareIndex can't be used for this.

Thanks in advance
Jürgen

--
http://www.sfgdornbirn.at
http://www.mcb-bregenz.at


(system) #3