uschindler commented on code in PR #13389: URL: https://github.com/apache/lucene/pull/13389#discussion_r1606861463
########## lucene/queries/src/java/org/apache/lucene/queries/intervals/IntervalBuilder.java: ########## @@ -67,15 +67,15 @@ */ final class IntervalBuilder { static IntervalsSource analyzeText(CachingTokenFilter stream, int maxGaps, boolean ordered) - throws IOException { + throws IOException { assert stream != null; TermToBytesRefAttribute termAtt = stream.getAttribute(TermToBytesRefAttribute.class); PositionIncrementAttribute posIncAtt = stream.addAttribute(PositionIncrementAttribute.class); PositionLengthAttribute posLenAtt = stream.addAttribute(PositionLengthAttribute.class); if (termAtt == null) { - return NO_INTERVALS; + return Intervals.noIntervals("No terms in analyzed text"); Review Comment: We can still have a constant for the whole instance. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org