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
本文详细介绍了 Solr 的初始化过程,包括监听器设置、索引删除策略、索引初始化、搜索组件配置、更新处理链创建及搜索器初始化等内容。特别关注了 updateProcessChain 的组成部分及其在处理更新请求中的作用。


2798

被折叠的 条评论
为什么被折叠?



