Skip to content

Commit

Permalink
Unify query builders
Browse files Browse the repository at this point in the history
  • Loading branch information
mjanuszkiewicz-tt committed Aug 29, 2024
1 parent ce5fbe0 commit 0aff981
Show file tree
Hide file tree
Showing 21 changed files with 53 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("country", country == null ? null : country.getValue());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distance_output", distanceOutput);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("country", country == null ? null : country.getValue());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distance_output", distanceOutput);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -65,6 +66,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -77,6 +79,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -65,6 +66,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -77,6 +79,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -65,6 +66,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -77,6 +79,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -65,6 +66,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -77,6 +79,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -65,6 +66,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -77,6 +79,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -65,6 +66,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -77,6 +79,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -65,6 +66,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -77,6 +79,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -65,6 +66,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -77,6 +79,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distance_output", distanceOutput);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distance_output", distanceOutput);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distance_output", distanceOutput);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -66,6 +67,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -78,6 +80,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -66,6 +67,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -78,6 +80,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -66,6 +67,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -78,6 +80,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -66,6 +67,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -78,6 +80,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -67,6 +68,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -79,6 +81,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public TraveltimeQueryBuilder(StreamInput in) throws IOException {
requestType = in.readOptionalEnum(RequestType.class);
prefilter = in.readOptionalNamedWriteable(QueryBuilder.class);
output = in.readString();
distanceOutput = in.readString();
}

@Override
Expand All @@ -67,6 +68,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalEnum(requestType);
out.writeOptionalNamedWriteable(prefilter);
out.writeString(output);
out.writeString(distanceOutput);
}

@Override
Expand All @@ -79,6 +81,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
builder.field("requestType", requestType == null ? null : requestType.name());
builder.field("prefilter", prefilter);
builder.field("output", output);
builder.field("distanceOutput", distanceOutput);
}

@Override
Expand Down
Loading

0 comments on commit 0aff981

Please sign in to comment.