public class SearchHit {
- private final String index;
- private final String type;
- private final String id;
- private final JSONObject source;
- private final JSONObject raw;
+ private final String index;
+ private final String type;
+ private final String id;
+ private final JSONObject source;
+ private final JSONObject raw;
- public SearchHit(JSONObject o) {
- this.raw = o;
- this.index=o.getString("_index");
- this.type = o.getString("_type");
- this.id = o.getString("_id");
- this.source = o.getJSONObject("_source");
- }
-
- public String getIndex() {
- return this.index;
- }
- public String getType() {
- return this.type;
- }
- public String getId() {
- return this.id;
- }
+ public SearchHit(JSONObject o) {
+ this.raw = o;
+ this.index=o.getString("_index");
+ this.type = o.getString("_type");
+ this.id = o.getString("_id");
+ this.source = o.getJSONObject("_source");
+ }
- public JSONObject getSource() {
- return this.source;
- }
- public String getSourceAsString() {
- return this.source.toString();
- }
+ public String getIndex() {
+ return this.index;
+ }
+ public String getType() {
+ return this.type;
+ }
+ public String getId() {
+ return this.id;
+ }
- /**
- * @return
- */
- public JSONObject getRaw() {
- return this.raw;
- }
+ public JSONObject getSource() {
+ return this.source;
+ }
+ public String getSourceAsString() {
+ return this.source.toString();
+ }
+ public JSONObject getRaw() {
+ return this.raw;
+ }
}