// Path: source_code/src/edu/virginia/cs/extra/Constants.java
// public class Constants {
// 
//     public final static int DEFAULT_NUM_RESULTS = 100;
//     public final static String DEFAULT_FIELD = "content";
//     public final static int NUM_FRAGMENTS = 4;
// }


import edu.virginia.cs.extra.Constants;
import java.util.ArrayList;
import java.util.Objects;

    public int numResults() {
        return numResults;
    }

    public SearchQuery numResults(int numResults) {
        this.numResults = numResults;
        return this;
    }

    public int fromDoc() {
        return from;
    }

    public SearchQuery fromDoc(int fromDoc) {
        this.from = fromDoc;
        return this;
    }

    public SearchQuery(String queryText, ArrayList<String> fields) {
        this.queryText = queryText;
        this.numResults = Constants.DEFAULT_NUM_RESULTS;
        this.fields = fields;
        from = 0;
    }

    public SearchQuery() {
        this.queryText = null;
        this.numResults = Constants.DEFAULT_NUM_RESULTS;
        this.fields = new ArrayList<>();
// Path: source_code/src/edu/virginia/cs/extra/Constants.java
// public class Constants {
// 
//     public final static int DEFAULT_NUM_RESULTS = 100;
//     public final static String DEFAULT_FIELD = "content";
//     public final static int NUM_FRAGMENTS = 4;
// }


// Path: source_code/src/edu/virginia/cs/engine/SearchQuery.java
import edu.virginia.cs.extra.Constants;
import java.util.ArrayList;
import java.util.Objects;


    public int numResults() {
        return numResults;
    }

    public SearchQuery numResults(int numResults) {
        this.numResults = numResults;
        return this;
    }

    public int fromDoc() {
        return from;
    }

    public SearchQuery fromDoc(int fromDoc) {
        this.from = fromDoc;
        return this;
    }

    public SearchQuery(String queryText, ArrayList<String> fields) {
        this.queryText = queryText;
        this.numResults = Constants.DEFAULT_NUM_RESULTS;
        this.fields = fields;
        from = 0;
    }

    public SearchQuery() {
        this.queryText = null;
        this.numResults = Constants.DEFAULT_NUM_RESULTS;
        this.fields = new ArrayList<>();
        fields.add(Constants.DEFAULT_FIELD);