String dateVal = "" + cal.get(Calendar.YEAR) + ",";
dateVal += cal.get(Calendar.MONTH) + ",";
int day = cal.get(Calendar.DATE) + i;
dateVal += day;
docBuilder.addField(Field.newBuilder().setName("datefield").setDate(dfDate.parse(dateVal)));
docBuilder.addField(Field.newBuilder().setName("htmlfield").setHTML("<B>html</B> " + i));
docBuilder.addField(Field.newBuilder().setName("atomfield").setAtom("atom" + i + ".com"));
GeoPoint geoPoint = new GeoPoint((double) i, (double) (100 + i));
docBuilder.addField(Field.newBuilder().setName("geofield").setGeoPoint(geoPoint));
// two field in same name and with different field type
docBuilder.addField(Field.newBuilder().setName("mixfield").setText("text and number mix field"));