ES Upserts for child doc types doesn't set the parent - Bug


I am using the ES 1.4.2 version and associated Java API. I see bug with ES for the Upsert script.

The Upsert operation is unable to set "_parent" for Child doc types.

Here I use the below Upsert script for inserting/updating the child doc of type "tag". The "tag" mapping has the parent "userinfo" mapping. I use "userId" in "UserInfo" mapping as its "_id". The "tag" type uses the same as "_parent".

    XContentBuilder builder = XContentFactory.jsonBuilder().startObject()
                    .field("eventDate", sdf.format(tagObj.getEventDate()))
                    .field("manufacturer", tagObj.getManufacturer())
                    .field("applicationId", tagObj.getApplicationId())
                    .field("count", tagObj.getEventCount())
                    .field("tag", tagObj.getEventName())
  "About to insert/update index for tag :" + builder.string());
                    .prepareUpdate("users", "tag", tagObj.getId())
                    .setScript("ctx._source.eventDate = \""+sdf.format(tagObj.getEventDate())
                                    +"\";ctx._source.count += "+tagObj.getEventCount()
                                    +"; = \""+tagObj.getCountry()+"\"")

Here this Upsert script inserts the "tag" doc but doesn't set the "_parent" field.

The same was working with the Insert script given below. The "_parent" was getting set in "tag" doc.

    bulkBuilder.add(esClient.prepareIndex("users", "tag", tagObj.getId())

Why is the Upsert operation having this issue.