Removing fields from indexed record types

You can remove fields from indexed record types so that these fields are no longer 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. You want to remove the Team field from the list of indexed fields for the ChangeRequest record type so that it is no longer searchable. You need to update the deployment by re-indexing only the ChangeRequest record type.

Procedure

  1. Edit the cqtsadmin-TextSearch-SAMPL.xml configuration file.
    1. Change 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 (;).

    2. Change the value of the <addRecordType> tag from this:
      <newValue required="no"></newValue>
      to this:
      <newValue required="no">ChangeRequest=Description,&amp;Headline,Keywords,Owner,Project</newValue>

      Notice that the Team field is excluded from the original list of fields to be indexed in the ChangeRequest record type, described in Adding record types to the search index.

  2. 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.

  3. Run the cqtsadmin.pl command again with the add_record_type option. This re-adds the ChangeRequest record type, which no longer specifies the Team field as an index 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.

  4. Edit the cqtsadmin-TextSearch-SAMPL.xml file again to remove the record types that you added to the <removeRecordType> and <addRecordType> tags in Step 1.

Results

You have removed the Team field as an index field for the ChangeRequest record type.