Class DefaultHighlighter

    • Constructor Detail

      • DefaultHighlighter

        public DefaultHighlighter()
      • DefaultHighlighter

        public DefaultHighlighter​(org.apache.lucene.search.highlight.Formatter formatter)
    • Method Detail

      • highlightTerm

        public Map<String,​String> highlightTerm​(@Nullable
                                                      String termUri,
                                                      String termLabel,
                                                      String field)
        Description copied from interface: OntologyHighlighter
        Produce a highlight for a given ontology term.
        Specified by:
        highlightTerm in interface OntologyHighlighter
        Parameters:
        termUri - a URI for the term or null for a full-text term
        termLabel - a label for the term
        field - an object path through which the term was found
        Returns:
        a suitable highlight, or null if none is found
      • getFormatter

        public org.apache.lucene.search.highlight.Formatter getFormatter()
        Description copied from interface: LuceneHighlighter
        Obtain a formatter for highlights.
        Specified by:
        getFormatter in interface LuceneHighlighter
      • highlightDocument

        public Map<String,​String> highlightDocument​(org.apache.lucene.document.Document document,
                                                          org.apache.lucene.search.highlight.Highlighter highlighter,
                                                          org.apache.lucene.analysis.Analyzer analyzer)
        Description copied from interface: LuceneHighlighter
        Highlight a given Lucene document.
        Specified by:
        highlightDocument in interface LuceneHighlighter