Package com.yahoo.prelude.query
Class Highlight
- java.lang.Object
-
- com.yahoo.prelude.query.Highlight
-
- All Implemented Interfaces:
java.lang.Cloneable
public class Highlight extends java.lang.Object implements java.lang.Cloneable
Class encapsulating information on extra highlight-terms for a query- Author:
- Mathias Lidal
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
HIGHLIGHTTERMS
The name of the property map which contains extra highlight terms
-
Constructor Summary
Constructors Constructor Description Highlight()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHighlightPhrase(java.lang.String field, java.util.List<java.lang.String> phrase)
Add custom highlight phrasevoid
addHighlightTerm(java.lang.String field, java.lang.String item)
Add custom highlight termHighlight
clone()
java.util.Map<java.lang.String,AndItem>
getHighlightItems()
Returns the modifiable map of highlight items (never null)java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getHighlightTerms()
void
prepare()
Prepares this for binary serialization.
-
-
-
Field Detail
-
HIGHLIGHTTERMS
public static final java.lang.String HIGHLIGHTTERMS
The name of the property map which contains extra highlight terms- See Also:
- Constant Field Values
-
-
Method Detail
-
addHighlightTerm
public void addHighlightTerm(java.lang.String field, java.lang.String item)
Add custom highlight term- Parameters:
field
- Field nameitem
- Term to be highlighted
-
addHighlightPhrase
public void addHighlightPhrase(java.lang.String field, java.util.List<java.lang.String> phrase)
Add custom highlight phrase- Parameters:
field
- Field namephrase
- List of terms to be highlighted as a phrase
-
getHighlightItems
public java.util.Map<java.lang.String,AndItem> getHighlightItems()
Returns the modifiable map of highlight items (never null)- Returns:
- Map of highlight items
-
clone
public Highlight clone()
- Overrides:
clone
in classjava.lang.Object
-
getHighlightTerms
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHighlightTerms()
-
prepare
public void prepare()
Prepares this for binary serialization. For internal use - seeQuery.prepare()
-
-