建立索引位置

配置 Solr 的第一步是建立 Lucene 索引的位置。
在本主题中,路径名中使用了下列变量:
CLEARQUEST_HOME
安装 Rational ClearQuest 的目录
RATIONAL_COMMON
安装 Rational 公共文件的目录
WAS_BIN
IBM WebSphere Application Server bin 目录:
在 Windows 上:
%RATIONAL_COMMON%\eWAS\bin
在 UNIX 系统和 Linux 上:
$RATIONAL_COMMON/eWAS/bin
缺省情况下,安装 Solr 时会将 Lucene 索引复制到以下位置:
在 Windows 上:
drive:\%CLEARQUEST_HOME%\CQ.Solr\
在 UNIX 系统和 Linux 上:
$CLEARQUEST_HOME/CQ.Solr/

要建立 ClearQuest 数据库的索引位置,请通过执行以下步骤复制和重命名索引:

  1. 将目录 CQ.Solr 复制到 ClearQuest 安装目录外的位置(位于安装了ClearQuest 全文搜索的相同计算机上)。考虑将 CQ.Solr 目录复制到专供全文搜索的第二个高速硬盘内。
  2. 重命名目录 CQ.Solr\SAMPL,以与您的 ClearQuest 模式对应。 例如,如果模式名为 MySchema,请将 CQ.Solr\SAMPL 重命名为 CQ.Solr\MySchema
  3. 通过运行 wsadmin 命令行实用程序以将 Java 虚拟机(JVM)系统属性 solr.solr.home 设置为 Lucene 索引的新位置:
    • 在 Windows 上:
      %WAS_BIN%\wsadmin.bat -conntype NONE -lang jython -profileName cqsearchprofile -f %WAS_BIN%\setSolrHome.py -interactive:yes drive:/CQ.Solr/yourSchemaName/Solr/solr
    • 在 UNIX 系统和 Linux 上:
      $WAS_BIN/wsadmin.sh -conntype NONE -lang jython -profileName cqsearchprofile -f $WAS_BIN/setSolrHome.py -interactive:yes /CQ.Solr/yourSchemaName/Solr/solr

    在启动时,Solr 将读取 solr.solr.home 的值,以找到其配置文件。

  4. 通过启动 cqsearchprofile(Solr 所在的 WebSphere Application Server 概要文件)以启动 Solr。
    • 在 Windows 上,通过使用控制面板:
      1. 单击开始 > 控制面板 > 管理工具 > 服务
      2. 在“服务”窗格中,右键单击 IBM WebSphere Application Server V6.1 - cmprofile,然后选择停止
      3. 服务停止之后,通过右键单击并选择启动将其重新启动。
    • 在 Windows 上,通过使用命令提示符窗口:
      > net stop "IBM WebSphere Application Server V6.1 - cqsearchprofile"
      > net start "IBM WebSphere Application Server V6.1 - cqsearchprofile"
    • 在 UNIX 系统和 Linux 上:

      根据 UNIX 系统或 Linux 的版本,将以下行中的某行添加到文件 init.d 中:

      $WAS_BIN/startServer.sh WebSphere-host -profileName cqsearchprofile

      或者

      $WAS_BIN/startServer.csh WebSphere-host -profileName cqsearchprofile

      此操作确保只要 WebSphere Application Server 重新启动,cqsearchprofile 就会自动启动。

    注意: 无论您何时更改了 solr.solr.home 的值,都必须重新启动 cqsearchprofile
相关概念
全文搜索维护
配置本地化字符集
相关参考
cqtssetup.pl
cqtsdbcrawler.pl
setmasterpropertyfromfile
scruboplog

反馈