mirror of https://github.com/apache/lucene.git
LUCENE-6792: Fix TermsQuery.toString to work with binary terms
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1702484 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
049fef3c9a
commit
09496a61a5
|
@ -123,6 +123,9 @@ Bug Fixes
|
||||||
* LUCENE-6776: Fix geo3d math to handle randomly squashed planet
|
* LUCENE-6776: Fix geo3d math to handle randomly squashed planet
|
||||||
models (Karl Wright via Mike McCandless)
|
models (Karl Wright via Mike McCandless)
|
||||||
|
|
||||||
|
* LUCENE-6792: Fix TermsQuery.toString() to work with binary terms.
|
||||||
|
(Ruslan Muzhikov, Robert Muir)
|
||||||
|
|
||||||
Other
|
Other
|
||||||
|
|
||||||
* LUCENE-6174: Improve "ant eclipse" to select right JRE for building.
|
* LUCENE-6174: Improve "ant eclipse" to select right JRE for building.
|
||||||
|
|
|
@ -182,8 +182,7 @@ public class TermsQuery extends Query implements Accountable {
|
||||||
builder.append(' ');
|
builder.append(' ');
|
||||||
}
|
}
|
||||||
first = false;
|
first = false;
|
||||||
builder.append(iterator.field()).append(':');
|
builder.append(new Term(iterator.field(), term).toString());
|
||||||
builder.append(term.utf8ToString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
|
|
|
@ -321,4 +321,9 @@ public class TermsQueryTest extends LuceneTestCase {
|
||||||
wrapped.close();
|
wrapped.close();
|
||||||
dir.close();
|
dir.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testBinaryToString() {
|
||||||
|
TermsQuery query = new TermsQuery(new Term("field", new BytesRef(new byte[] { (byte) 0xff, (byte) 0xfe })));
|
||||||
|
assertEquals("field:[ff fe]", query.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue