public class HighlightOptions extends Object
hl=true. As long as there are no fields defined * will be used. Some
options like setFormatter(String) can be set directly. Any option can be set via
addHighlightParameter(HighlightParameter).| Modifier and Type | Class and Description |
|---|---|
static class |
HighlightOptions.FieldWithHighlightParameters
Field with hightlight query parameters
|
static class |
HighlightOptions.HighlightParameter
Query Parameter to be used for highlighting
|
| Modifier and Type | Field and Description |
|---|---|
static Field |
ALL_FIELDS |
| Constructor and Description |
|---|
HighlightOptions() |
public static final Field ALL_FIELDS
public HighlightOptions addField(Field field)
field - public HighlightOptions addField(String fieldname)
fieldname - public HighlightOptions addField(String... fieldnames)
fieldnames - public HighlightOptions addFields(Collection<String> fieldnames)
fieldnames - @Nullable public FilterQuery getQuery()
public HighlightOptions setQuery(FilterQuery query)
FilterQuery to be used for hl.qquery - public HighlightOptions setFragsize(Integer fragsize)
hl.fragsize.fragsize - public HighlightOptions setFormatter(String formatter)
hl.formatterformatter - public HighlightOptions setNrSnipplets(Integer nrSnipplets)
hl.snippetsnrSnipplets - public HighlightOptions setSimplePrefix(String prefix)
hl.simple.preprefix - public HighlightOptions setSimplePostfix(String postfix)
hl.simple.postpostfix - public Collection<HighlightOptions.HighlightParameter> getHighlightParameters()
public HighlightOptions addHighlightParameter(String parameterName, Object value)
parameterName - must not be nullvalue - public HighlightOptions addHighlightParameter(HighlightOptions.HighlightParameter parameter)
parameter - must not be null@Nullable public <S> S getHighlightParameterValue(String parameterName)
parameterName - public Collection<HighlightOptions.FieldWithHighlightParameters> getFieldsWithHighlightParameters()
public boolean hasQuery()
public boolean hasFields()
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.