Package com.yahoo.prelude.query
Class Highlight
java.lang.Object
com.yahoo.prelude.query.Highlight
- All Implemented Interfaces:
Cloneable
Class encapsulating information on extra highlight-terms for a query
- Author:
- Mathias Lidal
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the property map which contains extra highlight terms -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addHighlightPhrase
(String field, List<String> phrase) Add custom highlight phrasevoid
addHighlightTerm
(String field, String item) Add custom highlight termclone()
Returns the modifiable map of highlight items (never null)void
prepare()
Prepares this for binary serialization.
-
Field Details
-
HIGHLIGHTTERMS
The name of the property map which contains extra highlight terms- See Also:
-
-
Constructor Details
-
Highlight
public Highlight()
-
-
Method Details
-
addHighlightTerm
Add custom highlight term- Parameters:
field
- the field nameitem
- the term to be highlighted
-
addHighlightPhrase
Add custom highlight phrase- Parameters:
field
- the field namephrase
- the list of terms to be highlighted as a phrase
-
getHighlightItems
Returns the modifiable map of highlight items (never null) -
clone
-
getHighlightTerms
-
prepare
public void prepare()Prepares this for binary serialization. For internal use - seeQuery.prepare()
-