码迷,mamicode.com
首页 > 其他好文 > 详细

CM开发日志 - 搜索引擎(二)

时间:2015-01-02 16:08:10      阅读:321      评论:0      收藏:0      [点我收藏+]

标签:电子商务   solr   websphere   搜索引擎   多核   

Solr多核(MultiCore)的概念

想象一下,如果在你的应用里,如果你的索引要区分Catalog,多语言和索引类型,这样的话,一个Search应用对应一个Solr实例是远远不够的,这样就引入了Solr多核(MultiCore)的概念。Solr多核就是在一个search 应用里面创建多个实例,然后给实例分别创建文件系统。

Solr多核的创建

WebSphere Commerce本地开发环境里面定义了一个基础的搜索组件(V:\IBM\WCDE_INT70\components\foundation\subcomponents\search),这个组件用来创建以及重置solr核。

技术分享

Command:

V:\IBM\WCDE_INT70\components\foundation\subcomponents\search\bin>setupSearchIndex.bat -masterCatalogId 12501 -solrhome V:\IBM\WCDE_INT70\search\solr\home1 -setupWebContent false

Utility执行过程:

技术分享

1.      初始化过程。从数据库读出Index Type(CatalogEntry,CatalogGroup)和Languages。

2.      修改本地的/Search/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml (步骤3)

3.      Started setup for Solr cores

i)       directory validation – 检查从数据库里面读的languages是否在template里面存在。

template

V:\IBM\WCDE_INT70\components\foundation\subcomponents\search\solr\home\template

ii)      Started copyingSolr core files(schemal.xml/stopwords.txt) – 从template里面拷贝

iii)    Started configuring DIH (wc-data-config.xml – for preprocess). -从template里面拷贝并将占位符填充好

被拷贝的文件路径是这个:V:\IBM\WCDE_INT70\components\foundation\subcomponents\search\solr\home\template\CatalogEntry\conf\database\cloudscape\wc-data-config.xml

iv)    Started registering Solr core in solr.xml. – 在本地的solr.xml里面注册-> V:\IBM\WCDE_INT70\search\solr\home1\solr.xml

参考资料:

以上过程请参见WCS Infocenterlink:

http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.developer.doc/tasks/tsdsearchsetuplocal.htm?cp=SSZLC2_7.0.0&lang=en

CM开发日志 - 搜索引擎(二)

标签:电子商务   solr   websphere   搜索引擎   多核   

原文地址:http://blog.csdn.net/alli0968/article/details/42340769

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!