public class Highlight extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
private Map<String,AndItem> |
highlightItems |
private Map<String,List<String>> |
highlightTerms |
static String |
HIGHLIGHTTERMS
The name of the property map which contains extra highlight terms
|
Constructor and Description |
---|
Highlight() |
Modifier and Type | Method and Description |
---|---|
private void |
addHighlightItem(String key,
Item value) |
void |
addHighlightPhrase(String field,
List<String> phrase)
Add custom highlight phrase
|
void |
addHighlightTerm(String field,
String item)
Add custom highlight term
|
Highlight |
clone() |
Map<String,AndItem> |
getHighlightItems()
Returns the modifiable map of highlight items (never null)
|
Map<String,List<String>> |
getHighlightTerms() |
void |
prepare()
Prepares this for binary serialization.
|
public static final String HIGHLIGHTTERMS
public void addHighlightTerm(String field, String item)
field
- Field nameitem
- Term to be highlightedpublic void addHighlightPhrase(String field, List<String> phrase)
field
- Field namephrase
- List of terms to be highlighted as a phrasepublic Map<String,AndItem> getHighlightItems()
public void prepare()
Query.prepare()
Copyright © 2018. All rights reserved.