apanimesh061 commented on a change in pull request #412: URL: https://github.com/apache/lucene/pull/412#discussion_r739865302
########## File path: lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/UnifiedHighlighter.java ########## @@ -165,6 +275,27 @@ public UnifiedHighlighter(IndexSearcher indexSearcher, Analyzer indexAnalyzer) { "indexAnalyzer is required" + " (even if in some circumstances it isn't used)"); } + /** + * Constructs the highlighter with the given the {@link Builder}. + * + * @param builder - a {@link Builder} object. + */ + public UnifiedHighlighter(Builder<?> builder) { + this.searcher = builder.searcher; + this.indexAnalyzer = Objects.requireNonNull(builder.indexAnalyzer); + this.flags = builder.flags; Review comment: Okay, I finally understand what I was misunderstanding. The builder getFlags will evaluate the flags based on booleans and the outer class's getFlags will just return the set like a regular getter. -- 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