fix typo and make parseIndexConstraints method static in FieldStatsRequest
This commit is contained in:
parent
50b31ce620
commit
2f360ecc16
|
@ -90,7 +90,7 @@ public class FieldStatsRequest extends BroadcastRequest<FieldStatsRequest> {
|
|||
break;
|
||||
case START_OBJECT:
|
||||
if ("index_constraints".equals(fieldName)) {
|
||||
parseIndexContraints(indexConstraints, parser);
|
||||
parseIndexConstraints(indexConstraints, parser);
|
||||
} else {
|
||||
throw new IllegalArgumentException("unknown field [" + fieldName + "]");
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public class FieldStatsRequest extends BroadcastRequest<FieldStatsRequest> {
|
|||
this.indexConstraints = indexConstraints.toArray(new IndexConstraint[indexConstraints.size()]);
|
||||
}
|
||||
|
||||
private void parseIndexContraints(List<IndexConstraint> indexConstraints,
|
||||
private static void parseIndexConstraints(List<IndexConstraint> indexConstraints,
|
||||
XContentParser parser) throws IOException {
|
||||
Token token = parser.currentToken();
|
||||
assert token == Token.START_OBJECT;
|
||||
|
@ -213,5 +213,4 @@ public class FieldStatsRequest extends BroadcastRequest<FieldStatsRequest> {
|
|||
out.writeString(level);
|
||||
out.writeBoolean(useCache);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue