allow no fields to be specified for the mlt builder, default to _all

This commit is contained in:
kimchy 2010-04-01 18:49:00 +03:00
parent fd574880fc
commit c2e8804b4d

View File

@ -163,9 +163,6 @@ public class MoreLikeThisJsonQueryBuilder extends BaseJsonQueryBuilder {
@Override protected void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(MoreLikeThisJsonQueryParser.NAME);
if (fields == null || fields.length == 0) {
throw new QueryBuilderException("moreLikeThis requires 'fields' to be provided");
}
if (fields != null) {
builder.startArray("fields");
for (String field : fields) {