public class TimingSearcher extends PingableSearcher
Modifier and Type | Class and Description |
---|---|
static class |
TimingSearcher.Parameters |
Modifier and Type | Field and Description |
---|---|
private static TimingSearcher.Parameters |
defaultParameters |
private boolean |
measureFill |
private com.yahoo.statistics.Value |
measurements |
private boolean |
measurePing |
private boolean |
measureSearch |
Constructor and Description |
---|
TimingSearcher(com.yahoo.component.ComponentId id,
TimingSearcher.Parameters setUp,
com.yahoo.statistics.Statistics manager) |
TimingSearcher(com.yahoo.component.ComponentId id,
TimingSearcherConfig config,
com.yahoo.statistics.Statistics manager) |
Modifier and Type | Method and Description |
---|---|
private static TimingSearcher.Parameters |
buildParameters(TimingSearcherConfig.Timer t) |
private static TimingSearcher.Parameters |
buildParameters(TimingSearcherConfig config,
String searcherName) |
void |
deconstruct() |
void |
fill(Result result,
String summaryClass,
Execution execution)
Fill hit properties with data using the given summary class.
|
Pong |
ping(Ping ping,
Execution execution)
Send a ping request downwards to probe if this searcher chain is in functioning order
|
private void |
postMeasure(boolean doIt,
long start) |
private long |
preMeasure(boolean doIt) |
Result |
search(Query query,
Execution execution)
Override this to implement your searcher.
|
void |
setMeasurements(com.yahoo.statistics.Value measurements)
This method is only included for testing.
|
ensureFilled, getLogger, process, toString
getAnnotatedDependencies, getDefaultAnnotatedDependencies, getDependencies, initDependencies
private com.yahoo.statistics.Value measurements
private final boolean measurePing
private final boolean measureSearch
private final boolean measureFill
private static final TimingSearcher.Parameters defaultParameters
TimingSearcher(com.yahoo.component.ComponentId id, TimingSearcher.Parameters setUp, com.yahoo.statistics.Statistics manager)
public TimingSearcher(com.yahoo.component.ComponentId id, TimingSearcherConfig config, com.yahoo.statistics.Statistics manager)
private static TimingSearcher.Parameters buildParameters(TimingSearcherConfig config, String searcherName)
private static TimingSearcher.Parameters buildParameters(TimingSearcherConfig.Timer t)
private long preMeasure(boolean doIt)
private void postMeasure(boolean doIt, long start)
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.
public Pong ping(Ping ping, Execution execution)
PingableSearcher
ping
in class PingableSearcher
public Result search(Query query, Execution execution)
Searcher
Searcher implementation subclasses will, depending on their type of logic, do one of the following:
Hits come in two kinds - concrete hits are actual content of the kind requested by the user, meta hits are hits which provides information about the collection of hits, on the query, the service and so on.
The query specifies a window into a larger result list that must be returned from the searcher through hits and offset; Searchers which returns list of hits in the top level in the result must return at least hits number of hits (or if impossible; all that are available), starting at the given offset. In addition, searchers are allowed to return any number of meta hits (although this number is expected to be low). For hits contained in nested hit groups, the concept of a window defined by hits and offset is not well defined and does not apply.
Error handling in searchers:
public void setMeasurements(com.yahoo.statistics.Value measurements)
public void deconstruct()
deconstruct
in class com.yahoo.component.AbstractComponent
Copyright © 2018. All rights reserved.