little more on the issue

builder.field(fieldName, tmp); calls the XContentBuilder API where class
type is determined and appropriate method is called. Since tmp, which is
instance of XContentBuilder, doesn't match any of the defined if conditions
it goes to final else where the tmp.toString() is called, and field(String,
String) method is called so we get object address in index.

builder.field(fieldName, tmp);
builder.field(fieldName, tmp.string());

shall make things work, but I am not sure if this would be the best way to
use the API.

Got the answer from ES user list :)

Can ES experts comment on the best way forward?

On Sun, Apr 13, 2014 at 8:10 PM, Ashish <[EMAIL PROTECTED]> wrote:

My Photo Galleries:

NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB