Skip to content

Commit

Permalink
Search API: Fields listed should exists within a "fields" Json object.
Browse files Browse the repository at this point in the history
…Closes #13.
  • Loading branch information
kimchy committed Feb 15, 2010
1 parent 9a9ce99 commit e768f67
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public void shard(SearchShardTarget target) {
builder.raw(source());
}
if (fields() != null) {
builder.startObject("fields");
for (SearchHitField field : fields().values()) {
if (field.values().isEmpty()) {
continue;
Expand All @@ -135,6 +136,7 @@ public void shard(SearchShardTarget target) {
builder.endArray();
}
}
builder.endObject();
}
if (explanation() != null) {
builder.field("_explanation");
Expand Down

0 comments on commit e768f67

Please sign in to comment.