return jsonBuilder() .startObject() .startObject(TYPE_NAME) .startObject("properties") .startObject("id") .field("type", "string") .field("index", "not_analyzed") .endObject() .startObject("title") .field("type", "string") .endObject() .startObject("price") .field("type", "long") .endObject() .startObject("originalPrice") .field("type", "long") .endObject() .startObject("units") .field("type", "nested") .startObject("properties") .startObject("size") .field("type", "string") .field("index", "not_analyzed") .endObject() .startObject("price") .field("type", "long") .endObject() .startObject("originalPrice") .field("type", "long") .endObject() .startObject("currency") .field("type", "string") .field("index", "not_analyzed") .endObject() .startObject("stock") .field("type", "long") .endObject() .endObject() .endObject() .endObject() .endObject() .endObject();