Minor fix: renaming read/writeNamedWritableList() to read/writeNamedWriteabelList() for consistency
The method for reading and writing single instances is called `read/writeNamedWriteable()`, so the list version should be spelled the same.
This commit is contained in:
parent
7653376ece
commit
b2606d98df
|
@ -515,7 +515,7 @@ public abstract class StreamInput extends InputStream {
|
|||
* Reads a list of {@link NamedWriteable} from the current stream, by first reading its size and then
|
||||
* reading the individual objects using {@link #readNamedWriteable()}.
|
||||
*/
|
||||
public <C> List<C> readNamedWritableList() throws IOException {
|
||||
public <C> List<C> readNamedWriteableList() throws IOException {
|
||||
List<C> list = new ArrayList<>();
|
||||
int size = readInt();
|
||||
for (int i = 0; i < size; i++) {
|
||||
|
|
|
@ -463,7 +463,7 @@ public abstract class StreamOutput extends OutputStream {
|
|||
* Writes a list of {@link NamedWriteable} to the current stream, by first writing its size and then iterating over the objects
|
||||
* in the list
|
||||
*/
|
||||
public void writeNamedWritableList(List<? extends NamedWriteable> list) throws IOException {
|
||||
public void writeNamedWriteableList(List<? extends NamedWriteable> list) throws IOException {
|
||||
writeInt(list.size());
|
||||
for (NamedWriteable obj : list) {
|
||||
writeNamedWriteable(obj);
|
||||
|
|
|
@ -144,7 +144,7 @@ public class AndQueryBuilder extends AbstractQueryBuilder<AndQueryBuilder> {
|
|||
@Override
|
||||
public AndQueryBuilder readFrom(StreamInput in) throws IOException {
|
||||
AndQueryBuilder andQueryBuilder = new AndQueryBuilder();
|
||||
List<QueryBuilder> queryBuilders = in.readNamedWritableList();
|
||||
List<QueryBuilder> queryBuilders = in.readNamedWriteableList();
|
||||
for (QueryBuilder queryBuilder : queryBuilders) {
|
||||
andQueryBuilder.add(queryBuilder);
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ public class AndQueryBuilder extends AbstractQueryBuilder<AndQueryBuilder> {
|
|||
|
||||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
out.writeNamedWritableList(this.filters);
|
||||
out.writeNamedWriteableList(this.filters);
|
||||
out.writeOptionalString(queryName);
|
||||
}
|
||||
}
|
|
@ -350,13 +350,13 @@ public class BoolQueryBuilder extends AbstractQueryBuilder<BoolQueryBuilder> imp
|
|||
@Override
|
||||
public BoolQueryBuilder readFrom(StreamInput in) throws IOException {
|
||||
BoolQueryBuilder boolQueryBuilder = new BoolQueryBuilder();
|
||||
List<QueryBuilder> queryBuilders = in.readNamedWritableList();
|
||||
List<QueryBuilder> queryBuilders = in.readNamedWriteableList();
|
||||
boolQueryBuilder.mustClauses.addAll(queryBuilders);
|
||||
queryBuilders = in.readNamedWritableList();
|
||||
queryBuilders = in.readNamedWriteableList();
|
||||
boolQueryBuilder.mustNotClauses.addAll(queryBuilders);
|
||||
queryBuilders = in.readNamedWritableList();
|
||||
queryBuilders = in.readNamedWriteableList();
|
||||
boolQueryBuilder.shouldClauses.addAll(queryBuilders);
|
||||
queryBuilders = in.readNamedWritableList();
|
||||
queryBuilders = in.readNamedWriteableList();
|
||||
boolQueryBuilder.filterClauses.addAll(queryBuilders);
|
||||
boolQueryBuilder.boost = in.readFloat();
|
||||
boolQueryBuilder.adjustPureNegative = in.readBoolean();
|
||||
|
@ -369,10 +369,10 @@ public class BoolQueryBuilder extends AbstractQueryBuilder<BoolQueryBuilder> imp
|
|||
|
||||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
out.writeNamedWritableList(this.mustClauses);
|
||||
out.writeNamedWritableList(this.mustNotClauses);
|
||||
out.writeNamedWritableList(this.shouldClauses);
|
||||
out.writeNamedWritableList(this.filterClauses);
|
||||
out.writeNamedWriteableList(this.mustClauses);
|
||||
out.writeNamedWriteableList(this.mustNotClauses);
|
||||
out.writeNamedWriteableList(this.shouldClauses);
|
||||
out.writeNamedWriteableList(this.filterClauses);
|
||||
out.writeFloat(this.boost);
|
||||
out.writeBoolean(this.adjustPureNegative);
|
||||
out.writeBoolean(this.disableCoord);
|
||||
|
|
|
@ -159,7 +159,7 @@ public class DisMaxQueryBuilder extends AbstractQueryBuilder<DisMaxQueryBuilder>
|
|||
@Override
|
||||
public DisMaxQueryBuilder readFrom(StreamInput in) throws IOException {
|
||||
DisMaxQueryBuilder disMax = new DisMaxQueryBuilder();
|
||||
List<QueryBuilder> queryBuilders = in.readNamedWritableList();
|
||||
List<QueryBuilder> queryBuilders = in.readNamedWriteableList();
|
||||
disMax.queries.addAll(queryBuilders);
|
||||
disMax.tieBreaker = in.readFloat();
|
||||
disMax.queryName = in.readOptionalString();
|
||||
|
@ -169,7 +169,7 @@ public class DisMaxQueryBuilder extends AbstractQueryBuilder<DisMaxQueryBuilder>
|
|||
|
||||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
out.writeNamedWritableList(this.queries);
|
||||
out.writeNamedWriteableList(this.queries);
|
||||
out.writeFloat(tieBreaker);
|
||||
out.writeOptionalString(queryName);
|
||||
out.writeFloat(boost);
|
||||
|
|
|
@ -143,7 +143,7 @@ public class OrQueryBuilder extends AbstractQueryBuilder<OrQueryBuilder> {
|
|||
@Override
|
||||
public OrQueryBuilder readFrom(StreamInput in) throws IOException {
|
||||
OrQueryBuilder orQueryBuilder = new OrQueryBuilder();
|
||||
List<QueryBuilder> queryBuilders = in.readNamedWritableList();
|
||||
List<QueryBuilder> queryBuilders = in.readNamedWriteableList();
|
||||
for (QueryBuilder queryBuilder : queryBuilders) {
|
||||
orQueryBuilder.add(queryBuilder);
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ public class OrQueryBuilder extends AbstractQueryBuilder<OrQueryBuilder> {
|
|||
|
||||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
out.writeNamedWritableList(this.filters);
|
||||
out.writeNamedWriteableList(this.filters);
|
||||
out.writeOptionalString(queryName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue