Creating an Index via Java API and JSON String

(dlpatri) #1

Hi guys,

I'm trying to use the Java API to help embed ElasticSearch in my tests. I'm seem to be getting stuck with setting the "settings" on the index. I have a JSON String:


And I'm basically calling:

ciReq = createIndexRequest(
  .settings(index.settings) //JSON String as shown above

return idxClient.create(ciReq).actionGet().acknowledged()

I've tried the JSON in a number of formats based on examples that I've seen. But nothing seems to have an effect on the created index. The logs always come back with something like this:

... [Oddball] creating Index [myindex], shards [5]/[1]

And the index is not in-memory.

Any help would be much appreciated.

(system) #2