SolrCore init
The main procedure list as above.
1. initListeners() : the listeners is defined in the solrconfig.xml. for defaute there are tow seaerch listeners:
<
listener
event
=
"newSearcher"
class
=
"solr.QuerySenderListener"
>
<
arr
name
=
"queries"
>
<!--
<lst><str name="q">solr</str><str name="sort">price asc</str></lst>
<lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
-->
</
arr
>
</
listener
>
<
listener
event
=
"firstSearcher"
class
=
"solr.QuerySenderListener"
>
<
arr
name
=
"queries"
>
<
lst
>
<
str
name
=
"q"
>static firstSearcher warming in solrconfig.xml</
str
>
</
lst
>
</
arr
>
</
listener
>
|
you can define other event listeners
2. initDeletionPolicy
3. initIndex: here, the indexWriter will be initialized according to the config info
4. searchComponents: init the search component defined in the solrconfig.xml
5. updateProcessChain: new a updateProcessChain. this Chain contain a list of updateProcessorFactory. the processor chain wouldn't create here. just the Factory initialized. thisProcessorChain is the most importante part in the updateRequest processing. It contain 3 processor now(LogUpdateProcessor, DistributedUpdateProceeor and RunUpdateProcessor). there will be a detail introduction of processorChain in next post.
6. getSearcher: init searcher predefined in the solrconfig.xml
7. create UpdateHandler: this updateHandler is defaute directUpdateHandler2. class directUpdateHandler2 direct process local update request. this class invoked byRunUpdateProcessor