This command is installed in the default product installation directory.
The entity file is generated when -o Entity is specified as the operation mode. It contains the submittable entities found in the database. Because these entities are well understood by the developer of the ClearQuest schema, further explanation of the entity file is unnecessary.
The ClearQuest search properties file is generated when -o CQ is specified as the operation mode. It contains several sections: search engine, database crawler, database, and entity. If the ClearQuest database is replicated, then there are multiple instances of each section. Each instance corresponds to a replica and might require a configuration that is specific to the replica.
The search engine section
<!- Solr Search Engine default parameters -–> <SearchEngine sitename="<local>" provider="Solr" version="1.2"> <searchrequest retries="3" url=http://localhost:14080/solr/select/?q=%s&start=%d&rows=%d /> <searchprop pagesize="25" cachesize="1000" /> </SearchEngine>
The database crawler section
This section describes XML tags in the database crawler section of the file,CQ-db_name-dbset_name.xml. Following is an example of that section:
<!- ClearQuest Database Crawler default parameters --> <CQDbCrawler sitename="<local>"> <batch size="250" delay="5" directory="./batch-output" url=http://localhost/solr/update/" /> <update size="250" delay="300" login_iteration="1" directory="./update-output" url=http://localhost/solr/update/" /> </CQDbCrawler>
For a replicated database, there is a separate <CQDbCrawler> tag for each replica, with each instance of sitename specifying the site of a replica. In the case of a replicated database, the record extractor looks for a sitename value that matches the name of the site at which it is running. If none is found, the record extractor fails to start.
Example
If the value of login_iteration is 10, and you change the value of delay from the default of 600 seconds to 60 seconds, then a new login session is created every 10 minutes, while a check for new or modified ClearQuest records occurs every minute. This enables the full-text search index to be more closely synchronized with the ClearQuest database.
The database section
This section describes XML tags in the database section of the file, CQ-db_name-dbset_name.xml. Following is an example of that section:
<!-- ClearQuest database and CM Server parameters --> <CQDatabase sitename="<local>"> <cmserver>http://localhost/TeamWeb/services/Team/</cmserver> <repository dbset="TextSearch" dbname="SAMPL" <username="admin" password="" keyfile=""></repository> </CQDatabase>
In the case of a replicated database, there is one instance of CQDatabase for each replica, with sitename specifying the site of the replica. The record extractor looks for a sitename that matches the site at which it is running; if none is found, the record extractor fails to start.
You do not need to modify this tag.
Otherwise, errors will occur when you run the record extractor, cqdbtscrawler.pl, in batch or update mode.
The entity section
This section describes XML tags in the entity section of the file,CQ-db_name-dbset_name.xml. Following is an example of that section:
<!- ClearQuest entity parameters --> <CQEntity name="Customer" index="true"> <field name="schema_mastership" disp_order="0" index="true" /> <field name="customer_name" disp_order="1" index="true" /> <field name="phone" disp_order="0" index="true" /> <field name="company_name" disp_order="0" index="true" /> . . . </CQEntity>
The Solr search schema file is generated when -o Solr is specified as the operation mode. As is the case with -o CQ, this operation mode takes as its input the entity file generated by running this command in entity mode (-o Entity). You do not edit the Solr search schema file; instead, you copy sections of it into the Solr schema file, schema.xml. (For information about schema.xml, see the Solr documentation.)
<Solr> <fields> <field name="Operator_Value" type="text" indexed="true" stored="false" required="false" multivalued="true"></field> <field name="misc_info" type="text" indexed="true" stored="false" required="false" multivalued="true"></field> ... <field name="Resolution" type="text" indexed="true" stored="false" required="false" multivalued="false"></field> ... <field name="comments" type="text" indexed="true" stored="false" required="false" multivalued="true"></field> ... <field name="RATL_CQ_UNIQUE_FIELD" type="string" indexed="true" stored="true" required="true" multivalued="false"></field> ... <field name="RATL_CQ_ALL_FIELDS" type="text" indexed="true" stored="false" required="false" multivalued="true"></field> </fields> </Solr> <uniqueKey>RATL_CQ_UNIQUE_FIELD</uniqueKey> <defaultSearchField>RATL_CQ_ALL_FIELDS</defaultSearchField> <copyField source="Operator_Value" dest="RATL_CQ_ALL_FIELDS"></copyField> <copyField source="misc_info" dest="RATL_CQ_ALL_FIELDS"></copyField> ... <copyField source="Resolution" dest="RATL_CQ_ALL_FIELDS"></copyField> ... <copyField source="Version" dest="RATL_CQ_ALL_FIELDS"></copyField> ... <copyField source="comments" dest="RATL_CQ_ALL_FIELDS"></copyField> ... <copyField source="Fax" dest="RATL_CQ_ALL_FIELDS"></copyField>
cqperl cqtssetup.pl -d SAMPL -s TextSearch -u admin -p "" -o Entity
This command generates the file Entity-SAMPL-TextSearch.txt. The content of the file is similar to the following text:
Email_Rule=ratl_mastership,ratl_keysite,record_type,dbid,is_active,version,lock_version,locked_by,name,…,…,… Customer=ratl_mastership,ratl_keysite,dbid,is_active,version,lock_version,locked_by,record_type,Name,Phone,Fax,Email,CallTrackingID,…,…,… Project=ratl_mastership,ratl_keysite,dbid,is_active,version,lock_version,locked_by,…,…,… Defect=ratl_mastership,record_type,dbid,is_active,id,state,version,lock_version,locked_by,isduplicate,unduplicate_state,Headline,Description,Priority,Severity,Submitter,…,…,…
Edit the file to specify the record types and fields that are to be searchable. For example, if only records of the type Defect are to be searchable, then delete all lines in the file except the one that begins Defect=. If only some of the fields that are defined by this record type are to be searchable, preserve only those fields, deleting the rest of them. For example, if only Headline, Description, and Severity are to be searchable, then the edited file would read
Defect=record_type,dbid,version,Headline,Description,Severity
Note that the fields record_type, dbid, and version are preserved. It is a requirement of the implementation of full-text search that those three fields be indexed.
cqperl cqtssetup.pl -d SAMPL -s TextSearch -u admin -p "" -o CQ -f Entity_SAMPLE_TextSearch.txt
This command generates the file, CQ-SAMPL-TextSearch.xml, which is used both by the record extractor (cqtsdbcrawler.pl) and the search feature.
cqperl cqtssetup.pl -d SAMPL -s TextSearch -u admin -p "" -o Solr Entity-SAMPL-TextSearch.txt
This command generates the file, Solr-SAMPL-TextSearch.xml. You do not edit this file: you copy sections of it into the Solr file, schema.xml.