AutoIncremented Id column is null after inserting data

Hi Team,

String json = "{" +
""user":"kimchy"," +
""postDate":"2013-01-30"," +
""message":"trying out Elasticsearch"" +
IndexResponse response= client.prepareIndex("test1,"testType", "")
System.out.println("Id "+response.getId());
System.out.println("Index "+response.getIndex());
System.out.println("Type "+response.getType());
System.out.println("Created "+response.status());
System.out.println("Created "+response.toString());

I ran above code through Java and "response.getId()" is returned null. I think, If we don't provide Id, ElasticSearch will create one. Looks like it is not doing that way. Can you please let me know what am i missing.

You provided an id : ""

Remove this parameter

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