Enable full-text search on the out-of-the-box ClearQuest SAMPL database
to learn about configuring the feature and its capabilities.
Before you begin
This scenario should take approximately 15 minutes to complete
because the
SAMPL database has few records.
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,...
to this:
Customer=Attachment,CallTrackingID,&Name,Phone,...
Defect=Attachments,Description,&Headline,Keywords,...
Email_Rule=Action_types,Actions,&Name,Operator_Value,...
Project=Description,&Name,dbid,...
You are not required to select a display field for each record
type. However, if you do not, the dbid 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 the Email_Rule record
type, delete it from the list. To index only the Name and Phone fields
for the Customer record type, delete the other fields.
- Edit the D:\CQ.Search\TextSearch_SAMPL\cqtsadmin-TextSearch-SAMPL.xml
configuration file.
- Change the value of the <updateIndexDelay> tag
from this:
<newValue required="no"></newValue>
to
this:com
<newValue required="no">60</newValue>
This
changes the default value of the update-mode indexing delay from 10
minutes (600 seconds) to 60 seconds, meaning that it will take approximately
60 seconds for a change that you make to a record to appear in a full-text
search result set.
- Optional: Change the value of the <updateIndexLoginInterval> tag
from this:
<newValue required="no"></newValue>
to
this:
<newValue required="no">10</newValue>
This changes the number of cycles of update-mode record
extraction prior to issuing a ClearQuest account re-login from the
default value of 1 to 10.
- 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, ClearQuest 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:
fts-was-profile-home/profile-name/bin/startServer.sh
where
the variables are:
- 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.