@Override protected void doXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(NAME); builder.field(BIG_FIELD.getPreferredName()); big.toXContent(builder, params); builder.field(LITTLE_FIELD.getPreferredName()); little.toXContent(builder, params); printBoostAndQueryName(builder); builder.endObject(); }
@Override protected void doXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(NAME); builder.field(QUERY_FIELD.getPreferredName()); queryBuilder.toXContent(builder, params); builder.field(FIELD_FIELD.getPreferredName(), fieldName); printBoostAndQueryName(builder); builder.endObject(); }
@Override protected void doXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(NAME); builder.startArray(CLAUSES_FIELD.getPreferredName()); for (SpanQueryBuilder<?> clause : clauses) { clause.toXContent(builder, params); } builder.endArray(); builder.field(SLOP_FIELD.getPreferredName(), slop); builder.field(IN_ORDER_FIELD.getPreferredName(), inOrder); printBoostAndQueryName(builder); builder.endObject(); }