Interface Highlighter

  • All Known Implementing Classes:
    DefaultHighlighter

    public interface Highlighter
    Custom highlighter for search results.
    Author:
    poirigui
    See Also:
    ubic.gemma.core.search.SearchResult#setHighlights(Map)
    • Method Detail

      • highlightTerm

        Map<String,​String> highlightTerm​(@Nullable
                                               String termUri,
                                               String termLabel,
                                               String field)
        Produce a highlight for a given ontology term.
        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
      • highlightDocument

        Map<String,​String> highlightDocument​(org.apache.lucene.document.Document document,
                                                   org.apache.lucene.search.highlight.Highlighter highlighter,
                                                   org.apache.lucene.analysis.Analyzer analyzer,
                                                   Set<String> fields)
        Highlight a given Lucene document.