Package ubic.gemma.core.search
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.lucene.search.highlight.Highlighter
createLuceneHighlighter(org.apache.lucene.search.highlight.QueryScorer queryScorer)
Obtain a highlighter for Lucene hits to be used withhighlightDocument(Document, org.apache.lucene.search.highlight.Highlighter, Analyzer, Set)
.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.Map<String,String>
highlightTerm(String termUri, String termLabel, String field)
Produce a highlight for a given ontology term.
-
-
-
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 termtermLabel
- a label for the termfield
- an object path through which the term was found- Returns:
- a suitable highlight, or null if none is found
-
createLuceneHighlighter
@Nullable org.apache.lucene.search.highlight.Highlighter createLuceneHighlighter(org.apache.lucene.search.highlight.QueryScorer queryScorer)
Obtain a highlighter for Lucene hits to be used withhighlightDocument(Document, org.apache.lucene.search.highlight.Highlighter, Analyzer, Set)
.
-
-