source.close();
} catch (IOException e) {
// ignore
}
if (multipleTokens) {
throw new ParseException("Cannot build RangeQuery with analyzer " + getAnalyzer().getClass()
+ " - tokens were added to part1");
}
source = getAnalyzer().tokenStream(field, new StringReader(part2));
// part2
try {
t = source.next();
if (t != null) {
part2 = t.termText();
}
multipleTokens = source.next() != null;
} catch (IOException e) {
t = null;
}
try {
source.close();
} catch (IOException e) {
// ignore
}
if (multipleTokens) {
throw new ParseException("Cannot build RangeQuery with analyzer " + getAnalyzer().getClass()
+ " - tokens were added to part2");
}
return super.getRangeQuery(field, part1, part2, inclusive);
}