/** * Constructs a query selecting all terms greater/equal than <code>lowerTerm</code> * but less/equal than <code>upperTerm</code>. * * <p> * If an endpoint is null, it is said * to be "open". Either or both endpoints may be open. Open endpoints may not * be exclusive (you can't select all but the first or last term without * explicitly specifying the term to exclude.) * * @param field The field that holds both lower and upper terms. * @param lowerTerm * The term text at the lower end of the range * @param upperTerm * The term text at the upper end of the range * @param includeLower * If true, the <code>lowerTerm</code> is * included in the range. * @param includeUpper * If true, the <code>upperTerm</code> is * included in the range. */ public TermRangeQuery(String field, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper) { super(new Term(field, lowerTerm), toAutomaton(lowerTerm, upperTerm, includeLower, includeUpper), Integer.MAX_VALUE, true); this.lowerTerm = lowerTerm; this.upperTerm = upperTerm; this.includeLower = includeLower; this.includeUpper = includeUpper; }
/** * Constructs a query selecting all terms greater/equal than <code>lowerTerm</code> * but less/equal than <code>upperTerm</code>. * * <p> * If an endpoint is null, it is said * to be "open". Either or both endpoints may be open. Open endpoints may not * be exclusive (you can't select all but the first or last term without * explicitly specifying the term to exclude.) * * @param field The field that holds both lower and upper terms. * @param lowerTerm * The term text at the lower end of the range * @param upperTerm * The term text at the upper end of the range * @param includeLower * If true, the <code>lowerTerm</code> is * included in the range. * @param includeUpper * If true, the <code>upperTerm</code> is * included in the range. */ public TermRangeQuery(String field, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper) { super(new Term(field, lowerTerm), toAutomaton(lowerTerm, upperTerm, includeLower, includeUpper), Integer.MAX_VALUE, true); this.lowerTerm = lowerTerm; this.upperTerm = upperTerm; this.includeLower = includeLower; this.includeUpper = includeUpper; }
/** * Constructs a query selecting all terms greater/equal than <code>lowerTerm</code> * but less/equal than <code>upperTerm</code>. * * <p> * If an endpoint is null, it is said * to be "open". Either or both endpoints may be open. Open endpoints may not * be exclusive (you can't select all but the first or last term without * explicitly specifying the term to exclude.) * * @param field The field that holds both lower and upper terms. * @param lowerTerm * The term text at the lower end of the range * @param upperTerm * The term text at the upper end of the range * @param includeLower * If true, the <code>lowerTerm</code> is * included in the range. * @param includeUpper * If true, the <code>upperTerm</code> is * included in the range. */ public TermRangeQuery(String field, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper) { super(new Term(field, lowerTerm), toAutomaton(lowerTerm, upperTerm, includeLower, includeUpper), Integer.MAX_VALUE, true); this.lowerTerm = lowerTerm; this.upperTerm = upperTerm; this.includeLower = includeLower; this.includeUpper = includeUpper; }
/** * Constructs a query selecting all terms greater/equal than <code>lowerTerm</code> * but less/equal than <code>upperTerm</code>. * * <p> * If an endpoint is null, it is said * to be "open". Either or both endpoints may be open. Open endpoints may not * be exclusive (you can't select all but the first or last term without * explicitly specifying the term to exclude.) * * @param field The field that holds both lower and upper terms. * @param lowerTerm * The term text at the lower end of the range * @param upperTerm * The term text at the upper end of the range * @param includeLower * If true, the <code>lowerTerm</code> is * included in the range. * @param includeUpper * If true, the <code>upperTerm</code> is * included in the range. */ public TermRangeQuery(String field, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper) { super(new Term(field, lowerTerm), toAutomaton(lowerTerm, upperTerm, includeLower, includeUpper), Integer.MAX_VALUE, true); this.lowerTerm = lowerTerm; this.upperTerm = upperTerm; this.includeLower = includeLower; this.includeUpper = includeUpper; }