You can add fields to indexed record types so that these
fields are searchable.
Before you begin
This scenario should take approximately 10 minutes to complete
when using the SAMPL database, which has few
records. In a production environment, the scenario can take from a
few hours to a few days to complete depending on the size and number
of records in your user database.
About this task
This scenario assumes that you have deployed full-text
search and added a new record type named ChangeRequest
to
your search index, as described in Adding
record types to the search index. Subsequently, your schema
designer adds a new field named BusinessPriority
to
the ChangeRequest
record type. You need to update
the deployment by re-indexing the ChangeRequest
record
type.
Procedure
- Edit the cqtsadmin-TextSearch-SAMPL.xml configuration
file.
- Remove the
ChangeRequest
record type
by changing the value of the <removeRecordType>
tag
from this:<newValue required="no"></newValue>
to
this:
<newValue required="no">ChangeRequest</newValue>
To
remove multiple record types, separate each with a semicolon (;).
- Re-add the
ChangeRequest
record type
to include the new BusinessPriority
field. Change
the value of the <addRecordType>
tag from this:
<newValue required="no"></newValue>
to
this:
<newValue required="no">ChangeRequest=BusinessPriority,Description,&Headline,Keywords,Owner,Project,Team</newValue>
To
add multiple fields, separate each with a comma (,).
- Run the cqtsadmin.pl command, with the remove_record_type option,
in a command prompt window. This removes the record type from the
search index.
Important: In a production environment,
be sure to back up your deployment before running the cqtsadmin.pl command
with the remove_record_type option. Run this
command during off-peak hours because the operation can take a few
minutes to a few days to complete, depending on the size of the database
and number of records affected.
cqperl cqtsadmin.pl
--username admin --password secret --dbset TextSearch --userdb SAMPL
--ftshome D:\CQ.Search --remove_record_type
Running
the cqtsadmin.pl command with the remove_record_type option
is a stateful operation. If you stop the command or it stops because
of an error, when you rerun the command, it resumes from where it
left off and continues to completion.
- Run the cqtsadmin.pl command again with
the add_record_type option. This re-adds the
ChangeRequest
record
type, which includes the new field, to the search index.cqperl
cqtsadmin.pl --username admin --password secret --dbset TextSearch
--userdb SAMPL --ftshome D:\CQ.Search --add_record_type
Running
the cqtsadmin.pl command with the add_record_type option
is a stateful operation. If you stop the command or it stops because
of an error, when you rerun the command, it resumes from where it
left off and continues to completion.
- Edit the cqtsadmin-TextSearch-SAMPL.xml file
again to remove the record type that you added to the
<removeRecordType>
and <addRecordType>
tags
in Step 1.
Results
You have added the BusinessPriority
field
to the list of indexed fields for the ChangeRequest
record
type.