@Test public void testLengthLower() { SuggesterRangeQuery q = new SuggesterRangeQuery("test", new BytesRef("lowerTerm"), new BytesRef("upper"), true, false, SuggesterRangeQuery.SuggestPosition.LOWER); assertEquals("lowerTerm".length(), q.length()); }
@Override public int length() { BytesRef prefix = getPrefix(); if (prefix == null) { return 0; } return prefix.utf8ToString().length(); }
SuggesterRangeQuery extends TermRangeQuery implements SuggesterQuery { @Override public int length() { BytesRef prefix = getPrefix(); if (prefix == null) { return 0; } return prefix.utf8ToString().length(); } }
SuggesterRangeQuery extends TermRangeQuery implements SuggesterQuery { @Override public int length() { BytesRef prefix = getPrefix(); if (prefix == null) { return 0; } return prefix.utf8ToString().length(); } SuggesterRangeQuery(
            final String field,
            final BytesRef lowerTerm,
            final BytesRef upperTerm,
            final boolean includeLower,
            final boolean includeUpper,
            final SuggestPosition suggestPosition
    ); }
SuggesterRangeQuery extends TermRangeQuery implements SuggesterQuery { @Override public int length() { BytesRef prefix = getPrefix(); if (prefix == null) { return 0; } return prefix.utf8ToString().length(); } SuggesterRangeQuery(
            final String field,
            final BytesRef lowerTerm,
            final BytesRef upperTerm,
            final boolean includeLower,
            final boolean includeUpper,
            final SuggestPosition suggestPosition
    ); @Override TermsEnum getTermsEnumForSuggestions(final Terms terms); @Override int length(); @Override boolean equals(Object o); @Override int hashCode(); }
SuggesterRangeQuery extends TermRangeQuery implements SuggesterQuery { @Override public int length() { BytesRef prefix = getPrefix(); if (prefix == null) { return 0; } return prefix.utf8ToString().length(); } SuggesterRangeQuery(
            final String field,
            final BytesRef lowerTerm,
            final BytesRef upperTerm,
            final boolean includeLower,
            final boolean includeUpper,
            final SuggestPosition suggestPosition
    ); @Override TermsEnum getTermsEnumForSuggestions(final Terms terms); @Override int length(); @Override boolean equals(Object o); @Override int hashCode();  }