AWC配置实现数据集内容全文检索(1)--智部提供
实现效果:可以在AWC中使用全局搜索,搜索数据集中的文件内容(使用通配符*进行模糊搜索)

配置方法如下:
1.在BMIDE修改全局参数Awp0StoreDatasetContent,设置为true,然后部署BMIDE

2.部署完成后,在TC命令窗口运行如下语句(target_dir参数值为TC_DATA目录):
bmide_modeltool.bat -u=infodba -p=infodba -g=dba -tool=all -mode=upgrade target_dir=C:\Siemens\tcdata
3.启动TC四层服务后登录TC,修改首选项
AWS_FullTextSearch_Index_Dataset_File_Content,设置为true

4.修改首选项AWC_Search_Enable_Snippets为true(可选操作,可以在搜索结果里高亮显示搜索的内容,建议开启),相关笔记:Display snippets from file content
5.启动Solr和Indexer服务,启动脚本命令如下:
cd C:\Siemens\Teamcenter12\solr-8.4.1
TcSchemaToSolrSchemaTransform.bat C:\Siemens\tcdata\ftsi\solr_schema_files && runSolr.bat

cd C:\Siemens\Teamcenter12\TcFTSIndexer\bin runTcFTSIndexer -task=objdata:index

&& runTcFTSIndexer -task=objdata:sync interval=25
错误处理,提示无法加载log4j的类:
The problem was that there were 3 missing jar files around log4j
log4j-1.2-api-2.17.1.jar
log4j-api-2.17.1.jar
log4j-core-2.17.1.jar
The reason they were missing is that the Tc12.3.0.0_ActiveWorkspace5.2.13_wntx64.zip media does not include them, but they are included in the Tc13.0.0.0_ActiveWorkspace5.2.13_wntx64.zip. So if you patch TC12 AW the files will be missing but if you patch TC13 AW they will be there.
Once the libraries were added to the $TC_ROOT/TcFTSIndexer/lib directory the indexing started working.
软件验证版本:tc12.4.0.2、AWC5.2
参考文档:index_search_deployment.pdf
浙公网安备 33010602011771号