public class QueryComponent extends SearchComponent
| Modifier and Type | Class and Description |
|---|---|
protected static class |
QueryComponent.FakeScorer
Fake scorer for a single document
TODO: when SOLR-5595 is fixed, this wont be needed, as we dont need to recompute sort values here from the comparator
|
SolrInfoMBean.Category| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_NAME |
protected static EndResultTransformer |
MAIN_END_RESULT_TRANSFORMER |
protected static EndResultTransformer |
SIMPLE_END_RESULT_TRANSFORMER |
standard_components| Constructor and Description |
|---|
QueryComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addFL(StringBuilder fl,
String field,
boolean additionalAdded) |
protected void |
createDistributedStats(ResponseBuilder rb) |
protected void |
createMainQuery(ResponseBuilder rb) |
protected void |
createRetrieveDocs(ResponseBuilder rb) |
int |
distributedProcess(ResponseBuilder rb)
Process for a distributed search.
|
protected void |
doFieldSortValues(ResponseBuilder rb,
SolrIndexSearcher searcher) |
protected void |
doPrefetch(ResponseBuilder rb) |
void |
finishStage(ResponseBuilder rb)
Called after all responses have been received for this stage.
|
String |
getDescription()
Simple one or two line description
|
URL[] |
getDocs()
Documentation URL list.
|
protected int |
groupedDistributedProcess(ResponseBuilder rb) |
protected void |
groupedFinishStage(ResponseBuilder rb) |
protected void |
handleGroupedResponses(ResponseBuilder rb,
ShardRequest sreq) |
protected void |
handleRegularResponses(ResponseBuilder rb,
ShardRequest sreq) |
void |
handleResponses(ResponseBuilder rb,
ShardRequest sreq)
Called after all responses for a single request were received
|
protected void |
mergeIds(ResponseBuilder rb,
ShardRequest sreq) |
protected void |
populateNextCursorMarkFromMergedShards(ResponseBuilder rb)
Inspects the state of the
ResponseBuilder and populates the next
ResponseBuilder.setNextCursorMark(org.apache.solr.search.CursorMark) as appropriate based on the merged
sort values from individual shards |
void |
prepare(ResponseBuilder rb)
Prepare the response.
|
protected void |
prepareGrouping(ResponseBuilder rb) |
void |
process(ResponseBuilder rb)
Actually run the query
|
protected int |
regularDistributedProcess(ResponseBuilder rb) |
protected void |
regularFinishStage(ResponseBuilder rb) |
protected void |
returnFields(ResponseBuilder rb,
ShardRequest sreq) |
protected NamedList |
unmarshalSortValues(SortSpec sortSpec,
NamedList sortFieldValues,
IndexSchema schema) |
protected void |
updateStats(ResponseBuilder rb,
ShardRequest sreq) |
getCategory, getName, getSource, getStatistics, getVersion, init, modifyRequest, setNamepublic static final String COMPONENT_NAME
protected static final EndResultTransformer MAIN_END_RESULT_TRANSFORMER
protected static final EndResultTransformer SIMPLE_END_RESULT_TRANSFORMER
public void prepare(ResponseBuilder rb) throws IOException
SearchComponentSearchComponent.process(org.apache.solr.handler.component.ResponseBuilder) method.
Called for every incoming request.
The place to do initialization that is request dependent.prepare in class SearchComponentrb - The ResponseBuilderIOException - If there is a low-level I/O error.protected void prepareGrouping(ResponseBuilder rb) throws IOException
IOExceptionpublic void process(ResponseBuilder rb) throws IOException
process in class SearchComponentrb - The ResponseBuilderIOException - If there is a low-level I/O error.protected void doFieldSortValues(ResponseBuilder rb, SolrIndexSearcher searcher) throws IOException
IOExceptionprotected void doPrefetch(ResponseBuilder rb) throws IOException
IOExceptionpublic int distributedProcess(ResponseBuilder rb) throws IOException
SearchComponentdistributedProcess in class SearchComponentIOExceptionprotected int groupedDistributedProcess(ResponseBuilder rb)
protected int regularDistributedProcess(ResponseBuilder rb)
public void handleResponses(ResponseBuilder rb, ShardRequest sreq)
SearchComponenthandleResponses in class SearchComponentprotected void handleGroupedResponses(ResponseBuilder rb, ShardRequest sreq)
protected void handleRegularResponses(ResponseBuilder rb, ShardRequest sreq)
public void finishStage(ResponseBuilder rb)
SearchComponentfinishStage in class SearchComponentprotected void groupedFinishStage(ResponseBuilder rb)
protected void regularFinishStage(ResponseBuilder rb)
protected void createDistributedStats(ResponseBuilder rb)
protected void updateStats(ResponseBuilder rb, ShardRequest sreq)
protected void createMainQuery(ResponseBuilder rb)
protected boolean addFL(StringBuilder fl, String field, boolean additionalAdded)
protected void mergeIds(ResponseBuilder rb, ShardRequest sreq)
protected void populateNextCursorMarkFromMergedShards(ResponseBuilder rb)
ResponseBuilder and populates the next
ResponseBuilder.setNextCursorMark(org.apache.solr.search.CursorMark) as appropriate based on the merged
sort values from individual shardsrb - A ResponseBuilder that already contains merged
ShardDocs in resultIds, may or may not be
part of a Cursor based request (method will NOOP if not needed)protected NamedList unmarshalSortValues(SortSpec sortSpec, NamedList sortFieldValues, IndexSchema schema)
protected void createRetrieveDocs(ResponseBuilder rb)
protected void returnFields(ResponseBuilder rb, ShardRequest sreq)
public String getDescription()
SolrInfoMBeangetDescription in interface SolrInfoMBeangetDescription in class SearchComponentpublic URL[] getDocs()
SolrInfoMBeanSuggested documentation URLs: Homepage for sponsoring project, FAQ on class usage, Design doc for class, Wiki, bug reporting URL, etc...
getDocs in interface SolrInfoMBeangetDocs in class SearchComponentCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.