public class FieldCollapsingSearcher extends Searcher
Modifier and Type | Field and Description |
---|---|
private static com.yahoo.processing.request.CompoundName |
collapse |
private static com.yahoo.processing.request.CompoundName |
collapsefield |
private static com.yahoo.processing.request.CompoundName |
collapsesize |
private static com.yahoo.processing.request.CompoundName |
collapseSummaryName |
private int |
defaultCollapseSize
The max number of hits that will be preserved per unique
value of the collapsing parameter.
|
private double |
extraFactor
The factor by which to scale up the requested number of hits
from the next searcher in the chain, because collapsing will
likely delete many hits.
|
private int |
maxQueries
Maximum number of queries to send next searcher
|
Constructor and Description |
---|
FieldCollapsingSearcher()
Create this searcher using default values for all settings
|
FieldCollapsingSearcher(int collapseSize,
double extraFactor,
String collapseField)
Creates a collapser
|
FieldCollapsingSearcher(com.yahoo.container.QrSearchersConfig config) |
FieldCollapsingSearcher(String collapseField)
Creates a collapser
|
Modifier and Type | Method and Description |
---|---|
private void |
collapse(Result result,
Map<String,Integer> knownCollapses,
Result resultSource,
String collapseField,
int collapseSize)
Collapse logic.
|
private void |
init(int collapseSize,
double extraFactor) |
Result |
search(Query query,
Execution execution)
First fetch result from the next searcher in the chain.
|
private Result |
search(Query query,
Execution execution,
int offset,
int hits) |
ensureFilled, fill, getLogger, process, toString
getAnnotatedDependencies, getDefaultAnnotatedDependencies, getDependencies, initDependencies
private static final com.yahoo.processing.request.CompoundName collapse
private static final com.yahoo.processing.request.CompoundName collapsefield
private static final com.yahoo.processing.request.CompoundName collapsesize
private static final com.yahoo.processing.request.CompoundName collapseSummaryName
private int maxQueries
private int defaultCollapseSize
private double extraFactor
public FieldCollapsingSearcher()
public FieldCollapsingSearcher(String collapseField)
collapseField
- the default field to collapse on, or null to not collapse as default@Inject public FieldCollapsingSearcher(com.yahoo.container.QrSearchersConfig config)
public FieldCollapsingSearcher(int collapseSize, double extraFactor, String collapseField)
collapseSize
- the maximum number of hits to keep per
field the default max number of hits in each collapsed groupextraFactor
- the percentage by which to scale up the
requested number of hits, to allow some hits to be removed
without refetchingcollapseField
- the field to collapse on. This is currently ignored.Copyright © 2018. All rights reserved.