Enabling full-text search on the SAMPL database
Enable full-text search on the out-of-the-box HCL Compass SAMPL database to learn about configuring the feature and its capabilities.
Before you begin
About this task
This scenario uses a schema repository with a connection
named TextSearch
and a user database named SAMPL.
The path specifications assume that you are running on the Windows™ operating system. Make
the appropriate substitutions if you are running on the UNIX™ system or Linux™.
Procedure
- Run the cqtsadmin.pl command, with the init_cq_fts and create_fts_was_profile options,
in a command prompt window:
cqperl cqtsadmin.pl --username admin --password secret --dbset TextSearch --userdb SAMPL --ftshome D:\CQ.Search --init_cq_fts --create_fts_was_profile automatic --fts_was_profile_home D:\CQFTS.WASprofiles
When this command completes, configuration data corresponding to your schema is placed in the following directory: D:\CQ.Search\TextSearch_SAMPL\ - Edit the entity file associated
with the deployment: D:\CQ.Search\TextSearch_SAMPL\Entity-TextSearch-SAMPL.txt.
For each record type, select a display field to appear in the full-text
search results by prepending an ampersand (&). For example, change
this:
Customer=Attachment,CallTrackingID,Name,Phone,... Defect=Attachments,Description,Headline,Keywords,... Email_Rule=Action_types,Actions,Name,Operator_Value,... Project=Description,Name,dbid,... groups=dbid,is_active,lock_version,name,... users=dbid,email,encrypted_password,fullname,...
to this:Customer=Attachment,CallTrackingID,&Name,Phone,... Defect=Attachments,Description,&Headline,Keywords,... Email_Rule=Action_types,Actions,&Name,Operator_Value,... Project=Description,&Name,dbid,... groups=dbid,is_active,lock_version,&name,... users=dbid,email,encrypted_password,&fullname,...
You are not required to select a display field for each record type. However, if you do not, thedbid
field is used as the default display field, which probably will not be useful in the search results. Note that you can always change the display field later without re-indexing the data. See Changing the display field for indexed record types for details.Important: When you are setting up full-text search on your production database, in addition to selecting display fields, you must also select which record types and associated fields to index. For example, if you do not want to index theEmail_Rule
record type, delete it from the list. To index only theName
andPhone
fields for theCustomer
record type, delete the other fields. - Edit the
D:\CQ.Search\TextSearch_SAMPL\cqtsadmin-TextSearch-SAMPL.xml
configuration file. - Run the cqtsadmin.pl command again with
the setup_cq_fts option to complete your deployment:
cqperl cqtsadmin.pl --username admin --password secret --dbset TextSearch --userdb SAMPL --ftshome D:\CQ.Search --setup_cq_fts
Important: In a production environment, HCL Compass Web client users can use full-text search during batch-mode indexing. However, results will be incomplete until the indexing completes. - UNIX™ system and Linux™: If you are running on
the UNIX™ system or Linux™, verify that the following command is
run as part of your start-up daemon to ensure that Solr and the record
indexer automatically start when the system is restarted:
where the variables are:fts-was-profile-home/profile-name/bin/startServer.sh
- fts-was-profile-home
- Directory where the WebSphere® Application Server profile for full-text search resides
- profile-name
- Name of the WebSphere® Application Server profile for the full-text search feature
For example:/opt/CQFTS.WASprofiles/cqfts_TextSearch_SAMPL/bin/startServer.sh server1 -profileName cqfts_TextSearch_SAMPL
Results
You have enabled full-text search on the SAMPL database.