mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
allow no fields to be specified for the mlt builder, default to _all
This commit is contained in:
parent
fd574880fc
commit
c2e8804b4d
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user