Projects >> elasticsearch >>6678acfe23bf9a10bcfaa9028a3f18c25970e0f1

Chunk
Conflicting content
 */
public class RangeQueryBuilder extends MultiTermQueryBuilder implements BoostableQueryBuilder {

<<<<<<< HEAD
    public static final boolean DEFAULT_INCLUDE_UPPER = true;

    public static final boolean DEFAULT_INCLUDE_LOWER = true;

    public static final String NAME = "range";

    private final String fieldName;

=======
    private final String name;
>>>>>>> f5f73259e4d98fa1d0ad6e441e3af3f0d7381cb9
    private Object from;
    private Object to;
Solution content
 */
public class RangeQueryBuilder extends MultiTermQueryBuilder implements BoostableQueryBuilder {

    public static final boolean DEFAULT_INCLUDE_UPPER = true;

    public static final boolean DEFAULT_INCLUDE_LOWER = true;

    public static final String NAME = "range";

    private final String fieldName;

    private Object from;

    private Object to;
File
RangeQueryBuilder.java
Developer's decision
Manual
Kind of conflict
Attribute
Chunk
Conflicting content
    private Object to;
    private String timeZone;
<<<<<<< HEAD

    private boolean includeLower = DEFAULT_INCLUDE_LOWER;

    private boolean includeUpper = DEFAULT_INCLUDE_UPPER;

    private float boost = 1.0f;

=======
    private boolean includeLower = true;
    private boolean includeUpper = true;
    private float boost = -1;
>>>>>>> f5f73259e4d98fa1d0ad6e441e3af3f0d7381cb9
    private String queryName;
    private String format;
Solution content
    private Object to;

    private String timeZone;

    private boolean includeLower = DEFAULT_INCLUDE_LOWER;

    private boolean includeUpper = DEFAULT_INCLUDE_UPPER;

    private float boost = 1.0f;

    private String queryName;
File
RangeQueryBuilder.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    }

    @Override
<<<<<<< HEAD
    public boolean doEquals(RangeQueryBuilder other) {
        return Objects.equals(fieldName, other.fieldName) &&
               Objects.equals(from, other.from) &&
               Objects.equals(to, other.to) &&
               Objects.equals(timeZone, other.timeZone) &&
               Objects.equals(includeLower, other.includeLower) &&
               Objects.equals(includeUpper, other.includeUpper) &&
               Objects.equals(boost, other.boost) &&
               Objects.equals(queryName, other.queryName) &&
               Objects.equals(format, other.format);
=======
    protected void doXContent(XContentBuilder builder, Params params) throws IOException {
        builder.startObject(RangeQueryParser.NAME);
        builder.startObject(name);
        builder.field("from", from);
        builder.field("to", to);
        if (timeZone != null) {
            builder.field("time_zone", timeZone);
        }
        if (format != null) {
            builder.field("format", format);
        }
        builder.field("include_lower", includeLower);
        builder.field("include_upper", includeUpper);
        if (boost != -1) {
            builder.field("boost", boost);
        }
        builder.endObject();
        if (queryName != null) {
            builder.field("_name", queryName);
        }
        builder.endObject();
>>>>>>> f5f73259e4d98fa1d0ad6e441e3af3f0d7381cb9
    }
}
Solution content
    @Override
    public boolean doEquals(RangeQueryBuilder other) {
        return Objects.equals(fieldName, other.fieldName) &&
               Objects.equals(from, other.from) &&
               Objects.equals(to, other.to) &&
               Objects.equals(timeZone, other.timeZone) &&
               Objects.equals(includeLower, other.includeLower) &&
               Objects.equals(includeUpper, other.includeUpper) &&
               Objects.equals(boost, other.boost) &&
               Objects.equals(queryName, other.queryName) &&
               Objects.equals(format, other.format);
    }
}
File
RangeQueryBuilder.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Method signature
Return statement