use of org.apache.solr.legacy.LegacyNumericTokenStream.LegacyNumericTermAttribute in project lucene-solr by apache.
the class TestLegacyFieldReuse method assertNumericContents.
private void assertNumericContents(int value, TokenStream ts) throws IOException {
assertTrue(ts instanceof LegacyNumericTokenStream);
LegacyNumericTermAttribute numericAtt = ts.getAttribute(LegacyNumericTermAttribute.class);
ts.reset();
boolean seen = false;
while (ts.incrementToken()) {
if (numericAtt.getShift() == 0) {
assertEquals(value, numericAtt.getRawValue());
seen = true;
}
}
ts.end();
ts.close();
assertTrue(seen);
}
Aggregations