public class JuniperSearcher extends Searcher
Note: This searcher only converts backend binary highlighting and separators to the configured highlighting and separator tags.
Modifier and Type | Field and Description |
---|---|
private String |
boldCloseTag |
private String |
boldOpenTag |
private static String |
ELLIPSIS |
static String |
JUNIPER_TAG_REPLACING |
private static String |
MAGIC_FIELD |
static char |
RAW_HIGHLIGHT_CHAR |
static char |
RAW_SEPARATOR_CHAR |
private String |
separatorTag |
Constructor and Description |
---|
JuniperSearcher(com.yahoo.component.ComponentId id,
com.yahoo.container.QrSearchersConfig config) |
Modifier and Type | Method and Description |
---|---|
private void |
addBolding(boolean bolding,
boolean insideHighlight,
FieldPart f,
String toQuote,
List<FieldPart> newFieldParts,
int previous,
int j) |
private void |
addSeparator(boolean bolding,
boolean dynteaser,
FieldPart f,
String toQuote,
List<FieldPart> newFieldParts,
int previous,
int j) |
void |
fill(Result result,
String summaryClass,
Execution execution)
Fill hit properties with data using the given summary class.
|
private void |
highlight(boolean bolding,
Iterator<Hit> hitsToHighlight,
String summaryClass,
IndexFacts.Session indexFacts) |
private List<FieldPart> |
initFieldParts(List<FieldPart> newFieldParts) |
private void |
insertTags(HitField oldProperty,
boolean bolding,
boolean dynteaser) |
Result |
search(Query query,
Execution execution)
Convert Juniper style property highlighting to XML style.
|
private void |
setSeparatorString(boolean bolding,
SeparatorFieldPart f) |
ensureFilled, getLogger, process, toString
getAnnotatedDependencies, getDefaultAnnotatedDependencies, getDependencies, initDependencies
public static final char RAW_HIGHLIGHT_CHAR
public static final char RAW_SEPARATOR_CHAR
private static final String ELLIPSIS
private static final String MAGIC_FIELD
public static final String JUNIPER_TAG_REPLACING
private String boldOpenTag
private String boldCloseTag
private String separatorTag
@Inject public JuniperSearcher(com.yahoo.component.ComponentId id, com.yahoo.container.QrSearchersConfig config)
public Result search(Query query, Execution execution)
public void fill(Result result, String summaryClass, Execution execution)
Searcher
This needs to be overridden by federating searchers to contact search sources again by propagating the fill call down through the search chain, and by source searchers which talks to fill capable backends to request the data to be filled. Other searchers do not need to override this.
private void highlight(boolean bolding, Iterator<Hit> hitsToHighlight, String summaryClass, IndexFacts.Session indexFacts)
private void insertTags(HitField oldProperty, boolean bolding, boolean dynteaser)
private void setSeparatorString(boolean bolding, SeparatorFieldPart f)
private void addSeparator(boolean bolding, boolean dynteaser, FieldPart f, String toQuote, List<FieldPart> newFieldParts, int previous, int j)
private void addBolding(boolean bolding, boolean insideHighlight, FieldPart f, String toQuote, List<FieldPart> newFieldParts, int previous, int j)
Copyright © 2018. All rights reserved.