cacheless_search_deployment
cacheless_search_deployment
Teamcenter 12.2
Cacheless Search
Deployment
PLM00301 • 12.2
Contents
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
How do I validate a spatial index? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
Why is qsearch_process_queue taking so long? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
How do I improve search engine performance? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
Why is my search slow? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2
• JT based
Configure this mode if you exclusively use CAD solutions other than NX.
• Mixed
If you work in a multi-CAD environment, you must configure both NX and JT modes.
To use cacheless search, populate the database with the following objects:
• Teamcenter bounding boxes (bbox data)
Bounding boxes must be created for all structures you want to search. Bounding boxes are
attached to their owning item revisions and to their geometry source, either a CAD or JT dataset.
To create bounding boxes, run the create_or_update_bbox_and_tso utility.
• (Optional) TruShape (TSO) voxel files. TruShape files provide more accurate results but occupy
additional space in the database.
To create TSO files, run the create_or_update_bbox_and_tso utility.
• Index queue
Teamcenter creates the index queue to hold objects that require their indexes to be created or
updated. Depending on your deployment strategy, the items may be restricted to one or more
selected products in the database.
Note
This queue is transient and gets used by the index update process as the objects in
the queue get processed and incorporated in the spatial index.
Once you have generated the initial data, you must keep it updated to reflect changes to the CAD
designs. There are two methods of doing this:
• Using Dispatcher
You can choose one of two deployment strategies when creating bounding boxes and search indexes:
• Full database
Use this strategy if you have relatively small products or designs for only a few products.
o Approximate size
• Attributes including item or item revision ID, name, occurrence notes, and form attributes
• Classification attributes
• Saved queries
Teamcenter uses bounding boxes and TruShape voxel maps that are created during the processing
of CAD designs to implement cacheless searches. Internally, it uses part-level bounding boxes to
construct and maintain the necessary spatial indexes.
If you use NX and the Teamcenter Integration for NX, you can configure NX to generate bounding
box data automatically. If you search JT files generated by another CAD tool, Teamcenter generates
the bounding box data when spatial searches are first enabled. The generation process may take a
significant time if you have large quantities of data.
Note
If you work in NX, you should not manipulate the JT files that Teamcenter creates from the
NX files.
The search initially identifies bounding boxes that intersect the bounding boxes of the selected
objects, limiting the search results to objects with geometry in close proximity. This allows Teamcenter
to display the initial results relatively quickly.
If you choose TruShape filtering, the search then tests the objects with intersecting bounding
boxes to determine if they have intersecting TruShape parameters. Depending on your TruShape
configuration, Teamcenter may simplify the geometry of each object into regular cubes (voxels) that
provide a simplified representation of the actual shapes. The TSO files contain voxel representations
of each part that has geometry.
The accuracy of the search results depend on the cell size you define in NX or the voxel size you
configure in Teamcenter if you are using JT files. The smaller the cell or voxel size, the more accurate
the results. However, smaller sizes result in larger TSO files and slower response times.
The following actions trigger an update of the bounding box data, search index, or both:
• The creation of a new Teamcenter item causes the creation of a structure index. If your system
automatically creates a dataset under the item revision when you create items, this action triggers
the creation of a bounding box, even if the bounding box is empty. This occurs whether you
create the item directly in Teamcenter or in any of the Teamcenter integrations.
• Any structure edits, the addition or subtraction of occurrences, and absolute occurrences
modifications cause the creation of the structure index .
• The creation of an NX or JT dataset triggers the creation of the bounding box. This action also
triggers a structure update to roll the bounding box information up to its parent structures.
• Any modification of an NX or JT dataset triggers an update of the bounding box. This action also
triggers a structure update to roll the updated bounding box information up to its parent structures.
Teamcenter also makes these updates if modified data is imported from another system.
Proximity search returns parts within the proximity range from the external surface of the target
part as shown in the following figure:
Proximity search with TruShape returns only the blue part shown in the following figure:
Proximity search without TruShape (only the bounding box filter) returns all the parts, including
the red parts, as shown in the following figure:
• Design Context.
• 4G Designer
• Active Workspace
You enter spatial criteria, attributes values, or a combination of both, and then click Search.
Teamcenter displays matching parts as a list of BOM lines. You can send selected lines to the
viewer for inspection.
Note
The bounding box and TruShape data generated for a JT dataset are ignored if an NX
dataset exists for the same item revision.
On high performance hardware with a well-tuned database, Teamcenter can create bounding boxes
for 1,000 parts to 5,000 parts per hour from JT data.
In many deployments, it is not necessary to use Dispatcher to periodically create and update
search indexes, as the Teamcenter Integration for NX provides a similar creation mechanism.
However, advanced NX features such as datum points, weld points, arrangements, and deformable
components are available only on JT datasets, and not on NX datasets. If you use advanced NX
features, ensure you extract the bounding box data from the JT dataset.
Use the create_or_update_bbox_and_tso utility with the JTTOBBOX+JTTOTSO option selected
to generate bounding box data that includes advanced NX features. You can then run the
qsearch_process_queue utility Dispatcher service to create the corresponding search index.
On high performance hardware with a well-tuned database, Teamcenter can create bounding boxes
for 10,000 parts to 20,000 parts per hour from NX data.
You can inspect the bounding box data for a selected part by adding bl_itemrev_bounding_box
to the displayed properties in Structure Manager. This property shows the following values of the
bounding box in the local coordinate space of the node:
• x minimum
• y minimum
• z minimum
• x maximum
• y maximum
• z maximum
Optionally, you can refine the accuracy of the proximity search when using TSO files. To configure
the cell size of the TSO file, change the setting of the TC_JT_voxel_size preference from its
default value of 12.75 millimeters. Some testing with sample geometry may be necessary to find
the optimum cell size.
The following example shows how TSO data refines the geometry:
In its simplest form, a spatial index is the bounding box that encloses the bounding boxes of all item
revisions of an item.
A spatial index is also the bounding box that encloses all the extents of the constituent substructure
(that is, subassemblies).
When Teamcenter calculates spatial indexes, it rolls up the boxes up wherever they are used.
Consequently, the boxes of Rev A, Rev B, and Rev C are rolled into the index of item A. This index
is saved separately to represent item A’s volume and is then propagated upward. It is transformed
into the coordinate space of its parent in the structure. The parent’s own index is extended to
accommodate the transformed indexes of all its children.
The spatial indexes are updated when Teamcenter processes requests on the index update queue.
The update queue contains items, occurrence threads, and appearance path nodes (APNs) that
are processed in batches. The queue is processed in batches on a first in, first out (FIFO) basis.
Teamcenter does not wait until the queue is full, but is configured with a maximum batch size for
optimum scalability. Only certain types of objects are placed in the queue, for example, changes to a
bounding box attached to an item revision causes Teamcenter to place the corresponding item in the
queue. Likewise, a change to a transform causes Teamcenter to place the corresponding occurrence
thread in the queue when the occurrence is saved in the database.
You create spatial indexes when you run the qsearch_process_queue utility to process the queue
and can optionally validate the indexes by running the same utility with the check_structure_indexes
option specified.
Note
There is a single indexer (qsearch_process_queue process) for each database.
Internally, a spatial search with spatial indexes is a BOM expansion guided by the index. Teamcenter
traverses down one level and finds any indexes that meet the specific spatial criteria. It prunes out
nonmatching indexes and continues the traversal down to the next level. Pruning removes subtrees
and discards unnecessary parts of the structure, contributing to the speed of the search. It also
processes overrides similarly. After configuration of the necessary lines, Teamcenter validates the
results against actual bounding boxes and TruShape data.
To correctly configure the data, Teamcenter generates a partial BOM structure. The time it spends
performing a search typically includes:
• Creating the partial BOM structure (50 to 70% of the total time).
• Configuring variants and processing properties (10 to 20% of the total time).
The lower the variation in geometry between different revisions of the same item, the better the
search engine performs. The greater the correlation between the product structure and the geometry
breakdown, the better the search engine performs.
Similarly, attribute searches require a partial BOM structure configuration, using objects that satisfy
the given attribute search criteria. Teamcenter first searches for the objects in the database and
then traverses up all BOM configurations. Some of the traversals may be outside of the structure
you are searching. However, implementation of product scoping avoids unnecessary traversals.
Teamcenter traverses up until it reaches the product in which the required results are found and
the final result is the same.
• Throughput of requests that cause index changes, which you can identify with the CAD tool
or a custom script or utility.
Tip
Avoid accumulating a large number of entries in the indexing queue. The faster
updates are processed, the sooner live updates are available to users. During the
deployment process, you should monitor the size of the queue by periodically running the
qsearch_process_queue utility with the -list_queue option selected. If the queue size
is increasing steadily, you may have to reconsider your deployment strategy. In a test
environment on high performance hardware, Teamcenter can process between 60,000 and
120,000 requests per hour without the queue building up.
If you have a relatively small product structure (a thousand or less occurrence threads), you may
improve performance by switching to a top-down search. This configuration limits the scope of the
search to the product only. However, Teamcenter must first traverse the unconfigured structure in
the database to establish the search scope. This approach may be more time-consuming with large
product structures; if so, it may be better to tune the default bottom-up search for best performance
in such cases.
By default, Teamcenter does not include all possible indexes that you might need for attribute
queries. Additional database indexes have an associated performance cost, and you should consider
carefully whether you need them. Use the Oracle database tools in a live production environment to
assist with these decisions.
• Identical revision and variant rules must be defined at all sites or searches may return inconsistent
results. Also, the content of these revision rules and variant rules must always be consistent
across all the sites.
• The content of saved queries must be consistent across all sites, or searches may return
inconsistent results.
• You can only initiate the search in Design Context and not in Structure Manager or Multi-Structure
Manager.
You do not need to manually configure IDSM to use remote cacheless searches. When you install
or upgrade the system using Teamcenter Environment Manager (TEM), it installs the callbacks
necessary for remote cacheless search. Each site participating in remote cacheless search must
install or upgrade the database using the same version of TEM.
• Product-scoped deployment
You mark one or more products as indexable, and Teamcenter processes only the relevant items.
No indexes are created for old and inactive programs, saving system resources.
The feasibility of processing the complete database depends on the size and number of bounding
boxes to process. As a guideline, product-scoped deployment is probably the best strategy if less
than 30% of your data is in active use.
To obtain a baseline time, you can test a representative sample of data and then estimate the time
needed to process all the bounding boxes and indexes. For example, if the entire database cannot
be processed in one weekend, you may prefer the product-scoped deployment strategy. Even with
this strategy, the initial preparation and processing of a single product may take hours or even days,
depending on the number of components in the product.
An alternative strategy is to use a product-scoped deployment when you first populate the database,
that is, to index your data one product at a time. You can then switch to a full database deployment
when the database is populated with all products.
2. Ensure that live background updates are turned off while you manually process the product data.
3. Prepare your data for processing by updating legacy transforms and removing cycles from the
database. This step must be completed carefully or the results of searches may be incorrect.
5. Make the product indexable. This step makes all components of the chosen product available for
cacheless searches.
6. Create the bounding boxes and TSO files for the chosen product.
7. After the bounding boxes and TSO files are available, populate the queue with the
entries for the chosen product. Do not run the qsearch_process_queue utility until the
create_or_update_bbox_and_tso has finished.
9. If you want to make other products in the database available for cacheless searches, repeat steps
3 through 6 for each product in turn.
10. Query for and process any bounding boxes remaining in the database that do not belong to the
products you have already processed.
11. Configure live background updates with Dispatcher or cron jobs to process changes to the
indexed data.
Note
In a typical system, you may run a cron job every 15 minutes to process updates. The
value could be adjusted, depending on how frequently data changes and the extent
of those changes.
Always turn off live background updates if you run the qsearch_process_queue utility
to manually process the queue.
2. Ensure that live background updates are turned off while you manually process the product data.
3. Prepare your data for processing, by updating legacy transforms and removing cycles from the
database. This step must be completed carefully or the results of searches may be incorrect.
4. Query for a list of dataset UIDs to process for the entire database.
5. Create the bounding boxes and TSO files for the database.
6. After creating the bounding boxes, regenerate the database statistics to improve search
performance.
7. Populate the queue with the entries for the entire database.
8. Process the queue you populated in the previous step. Do not run the qsearch_process_queue
utility until the create_or_update_bbox_and_tso has finished.
9. After generating the indexes for a product, regenerate the database statistics to improve search
performance
10. Configure live background updates with Dispatcher or cron jobs to process changes to the
indexed data.
Note
In a typical system, you may run a cron job every 15 minutes to process updates. The
value could be adjusted, depending on how frequently data changes and the extent
of those changes.
Always turn off live background updates if you run the qsearch_process_queue utility
to manually process the queue.
Note
Ensure that you have the typical Teamcenter environment variables set for all command
line utilities.
2. Run the nxmgr_update_transforms utility to upgrade the transforms in the following format:
nxmgr_upgrade_transforms -u={USER_ID} -p={PASSWORD} -g={GROUP} -bypass=yes
-i=c:\temp\legacytransforms.txt -upgrade_release=yes.
3. Run the -list_legacy_transforms option again to ensure that all transforms are upgraded.
2. Clean up the cycles as per your organization’s plan, considering that cleaning up cycles affects
the content of the data.
Tip
(Product-scoped cacheless searches only)
The -check_structure_indexes argument of the qsearch_process_queue utility flags
cycles in a structure with an index-box-check found cycle report. This argument starts
the utility at one or more specified items and works down the entire substructure. It finds
apparently incorrect indexes and, at the same time, also finds cycles. Conversely, the
find_cycles argument works up the substructure from the specified item; if you specify
only top-level items, it returns no results. Also, the find_cycles argument takes all items
by default.
In general, arguments with structure in the name interpret given item IDs as top-level
items, and perform the relevant action on the entire structure below each item. Options
without structure in the name simply perform the relevant action on each item in isolation.
Therefore, the -check_indexes argument simply checks each item's index but does not
find any cycles; the -check_structure_indexes argument also identifies any cycles.
To check for cycles under a top-level item, enter a command similar to the following
example:
qsearch_process_queue -dump_substructure -item_id=top-level-item-id(s) 2>&1
) | grep " item " | sed -e "s/ *item *//" | sort -u >all_substructure_item_uids_file
qsearch_process_queue -find_cycles -uid=@all_substructure_item_uids_file
The -dump_substructure argument produces an output similar to the following example,
followed by a list of the item UIDs of all items in the structure. The -find_cycles then reads
and processes the list of items.
# descend_structure: at level 1
item gsWFWitwAAgcRA
occThread gBUFWitwAAgcRA
occThread gBfFWitwAAgcRA
# descend_structure: at level 2
item g4SFWitwAAgcRA
item wESFWitwAAgcRA
occThread ARXFWitZAAgcRA
occThread ABRFWi9dAAgcRA
occThread gJZFWitwAAgcRA
occThread gJdFWitwAAgcRA
apn wYXFWivRAAgcRA
# descend_structure: at level 3
item wIaFWitwAAgcRA
item w4aFWitwAAgcRA
Note
The use of refined search based on TSO files is optional for spatial searches.
2. Set the cell size and cell units, and click Generate Component Shape Representations on
Save.
TSO files are generated upon every save.
Note
The default cell size in NX is 0.0 mm. A cell size of 5.0 mm is recommended for initial
testing. You can define your own cell size that is best for your design practice. Bear in
mind that smaller the cell size, the longer the proximity search takes.
3. Run the run_tc_publishing_utility.bat utility in the following format to generate TSO files for the
existing NX dataset:
run_tc_publishing_utility.bat -u=%tc_admin_user% -p=%tc_admin_pwd% -g=dba -i="!file!"
-publish_tr=yes -record_pa=yes -log="!file!_refile.txt"
Note
The run_tc_publishing_utility.bat utility is supplied with NX and more information is
provided in the Teamcenter Integration for NX documentation in the NX Help.
• PQSEARCHINDEXABLEOCCTHREAD
• PQSEARCHINDEXABLEAPN
Note
If you want to disable the product scoped-cacheless search, run the
qsearch_process_queue -u={USER_ID} -p={PASSWORD} -g={GROUP}
-disable_product_scoping -drop_table command once for every database.
Note
• Run the qsearch_process_queue -u={USER_ID} -p={PASSWORD} -g={GROUP}
-make_non_indexable -product={PRODUCT_ITEM_ID} command if you want to
make the product non indexable.
• After you index a product, it is recommended that you regenerate the database statistics
to improve the search performance, as described in the database documentation.
Before you start creating the bounding boxes, it is recommended that you do the following:
• Set up the environment variable to manage the syslogs, TC_KEEP_SYSTEM_LOG=Y.
1. Run the create_or_update_bbox_and_tso utility to query the database and find out how many
bounding boxes need to be processed for the entire database.
Run the utility in this format: create_or_update_bbox_and_tso -u={USER_ID}
-p={PASSWORD} -g={GROUP} -translation_mode=NXBBOXTOBBOX -mode=query
-product=%ITEM_ID% -output_dir=%TC_TMP_DIR%.
Note
This can be done only if the product has been made indexable.
If you delete bounding boxes, the operation removes the bounding boxes, multi-bounding boxes, and
the relations that link them together.
Depending on your requirement, you may run any of these commands:
• Run the create_or_update_bbox_and_tso command in the following format to delete all the
bounding boxes in the database:
create_or_update_bbox_and_tso -u={USER_ID} -p={PASSWORD} -g={GROUP}
-delete_all_bboxes .
1. Run the create_or_update_bbox_and_tso utility in the following format to query the database
and find out how many bounding boxes need to be processed for the entire database:
create_or_update_bbox_and_tso -u={USER_ID} -p={PASSWORD} -g={GROUP}
-translation_mode= JTTOTSO -mode=query -product=%ITEM_ID%
-output_dir=%TC_TMP_DIR%.
Note
This can be done only if the product specified in the command line in the -product
option has been made indexable.
Populate the queue by running the qsearch_process_queue command in the following format:
qsearch_process_queue -u={USER_ID} -p={PASSWORD} -g={GROUP}
-force_queue_product_substructure_update -product={PRODUCT_ITEM_ID}.
This updates the queue with all the necessary objects related to the product.
Note
Populating the queue generates entries into the PQSEARCHINDEXUPDATEENTRY
table for each bounding box.
After processing the queue, it is recommended that you generate the database again to improve
search performance.
Process by UID
• Run the qsearch_process_queue utility in the following format to process all multiple UIDs
using a comma-separated list:
qsearch_process_queue -u={USER_ID} -p={PASSWORD} -g={GROUP} -process_queue
-uid=0$0F56myQyYmUC.
Deleting an index
If you want to delete an index in your database, use the qsearch_process_queue command in
the following format:
qsearch_process_queue -u={USER_ID} -p={PASSWORD} -g={GROUP} -clear_product_indexes
-product=%ITEM_ID%.
The following figure illustrates the process of how an NX dataset is created, saved, and the spatial
index, updated with Dispatcher setup.
1. When a geometry is saved, triggers are automatically set for creating bounding boxes and
TSO within the NX application. It also triggers a structure update to roll up the bounding box
information to its parent structure.
Note
If you would like to configure the QsearchProcessQueue Dispatcher translator as a
recurring request, set the following preferences as required:
• QSEARCH_queue_recurring_background_updates
• QSEARCH_recurring_background_update_survival_time
• QSEARCH_recurring_background_update_interval
If you want to reduce the objects getting added to the queue and also reduce the number of Dispatcher
requests, specify the item types you want to avoid in the QSEARCH_types_to_avoid_processing
preference.
• Installed the following Dispatcher translators, using TEM, as shown in the following figure:
o JtToBboxAndTso
o QSearchProcessQueue
Note
It is recommended that you use only one translator for the spatial search indexer.
• Set the QSEARCH_update_enabled preference to True if you want to generate TSO files.
The following figure illustrates the process of how a JT dataset is created, saved, and the spatial
index updated with Dispatcher setup.
1. When a geometry is saved, triggers are automatically set for creation of a JT file.
2. The JT file is created and it requests the Dispatcher to generate the bounding boxes and TSO
files.
3. The JT is loaded and the bounding box information is populated in the bounding box table. The
tables in the database are populated with the bounding box information.
Note
If you would like to configure the QsearchProcessQueue Dispatcher translator as a
recurring request, set the following preferences as required:
• QSEARCH_queue_recurring_background_updates
• QSEARCH_recurring_background_update_survival_time
• QSEARCH_recurring_background_update_interval
If you want to reduce the objects getting added to the queue and also reduce the
number of dispatcher requests, specify the item types you want to avoid in the
QSEARCH_types_to_avoid_processing preference.
• Identical revision and variant rules must be defined at all sites or searches may return inconsistent
results. Also, the content of these revision rules and variant rules must always be consistent
across all the sites.
• The content of saved queries must be consistent across all sites or searches may return
inconsistent results.
• You can only initiate the search in Design Context, not in Structure Manager or Multi-Structure
Manager.
• QS_remote_master_site_override
This preference allows the user to define a preferred remote site to make cacheless searches. It
must be defined in a format similar to the following example:
Product3:master_site3
Whenever you add a new product or assembly to remotely search in Design Context, the
administrator must update this preference with the new product and its owning master site at all
sites in the Multi-Site Collaboration network.
You do not need to manually configure IDSM to use remote cacheless searches. When you install
or upgrade the system using Teamcenter Environment Manager (TEM), it installs the callbacks
necessary for remote cacheless search. Each site participating in remote cacheless search must
install or upgrade the database using the same version of TEM.
Note
Ensure that you have the typical Teamcenter environment variables set for all command
line utilities.
2. Run the nxmgr_update_transforms utility to upgrade the transforms in the following format:
nxmgr_upgrade_transforms -u={USER_ID} -p={PASSWORD} -g={GROUP} -bypass=yes
-i=c:\temp\legacytransforms.txt -upgrade_release=yes.
3. Run the -list_legacy_transforms option again to ensure that all transforms are upgraded.
2. Clean up the cycles as per your organization’s plan, considering that cleaning up cycles affects
the content of the data.
Tip
(Product-scoped cacheless searches only)
The -check_structure_indexes argument of the qsearch_process_queue utility flags
cycles in a structure with an index-box-check found cycle report. This argument starts
the utility at one or more specified items and works down the entire substructure. It finds
apparently incorrect indexes and, at the same time, also finds cycles. Conversely, the
find_cycles argument works up the substructure from the specified item; if you specify
only top-level items, it returns no results. Also, the find_cycles argument takes all items
by default.
In general, arguments with structure in the name interpret given item IDs as top-level
items, and perform the relevant action on the entire structure below each item. Options
without structure in the name simply perform the relevant action on each item in isolation.
Therefore, the -check_indexes argument simply checks each item's index but does not
find any cycles; the -check_structure_indexes argument also identifies any cycles.
To check for cycles under a top-level item, enter a command similar to the following
example:
qsearch_process_queue -dump_substructure -item_id=top-level-item-id(s) 2>&1
) | grep " item " | sed -e "s/ *item *//" | sort -u >all_substructure_item_uids_file
qsearch_process_queue -find_cycles -uid=@all_substructure_item_uids_file
The -dump_substructure argument produces an output similar to the following example,
followed by a list of the item UIDs of all items in the structure. The -find_cycles then reads
and processes the list of items.
# descend_structure: at level 1
item gsWFWitwAAgcRA
occThread gBUFWitwAAgcRA
occThread gBfFWitwAAgcRA
# descend_structure: at level 2
item g4SFWitwAAgcRA
item wESFWitwAAgcRA
occThread ARXFWitZAAgcRA
occThread ABRFWi9dAAgcRA
occThread gJZFWitwAAgcRA
occThread gJdFWitwAAgcRA
apn wYXFWivRAAgcRA
# descend_structure: at level 3
item wIaFWitwAAgcRA
item w4aFWitwAAgcRA
Note
The use of refined search based on TSO files is optional for spatial searches.
2. Set the cell size and cell units, and click Generate Component Shape Representations on
Save.
TSO files are generated upon every save.
Note
The default cell size in NX is 0.0 mm. A cell size of 5.0 mm is recommended for initial
testing. You can define your own cell size that is best for your design practice. Bear in
mind that smaller the cell size, the longer the proximity search takes.
3. Run the run_tc_publishing_utility.bat utility in the following format to generate TSO files for the
existing NX dataset:
run_tc_publishing_utility.bat -u=%tc_admin_user% -p=%tc_admin_pwd% -g=dba -i="!file!"
-publish_tr=yes -record_pa=yes -log="!file!_refile.txt"
Note
The run_tc_publishing_utility.bat utility is supplied with NX and more information is
provided in the Teamcenter Integration for NX documentation in the NX Help.
Before you start creating the bounding boxes, it is recommended that you do the following:
• Set up the environment variable to manage the syslogs, TC_KEEP_SYSTEM_LOG=Y.
1. Run the create_or_update_bbox_and_tso utility in the following format to query the database
and find out how many bounding boxes need to be processed for the entire database.
create_or_update_bbox_and_tso -u={USER_ID} -p={PASSWORD} -g={GROUP}
-translation_mode=NXBBOXTOBBOX -mode=query -output_dir=%TC_TMP_DIR%.
This generates the createOrUpdateBBoxAndtso_report{%ID%_0.log file.
Note
You can run the command only if the product has been made indexable when using
product scoped search.
4. Validate the bounding boxes by sending an assembly to Structure Manager, adding the Bounding
Boxes column, and then expanding the assembly to a level that has geometry.
The column will be populated with the bounding box information.
If you delete bounding boxes, the operation removes the bounding boxes, multi-bounding boxes, and
the relations that link them together.
Depending on your requirement, you may run any of these commands:
• Run the create_or_update_bbox_and_tso -u={USER_ID} -p={PASSWORD} -g={GROUP}
-delete_all_bboxes command to delete all the bounding boxes in the database.
Depending on your requirement, run one or all the utilities to query the database to find out how
many UIDs will need to be processed.
1. Run the create_or_update_bbox_and_tso –u={USER_ID} -p={PASSWORD} -g={GROUP}
-translation_mode=JTTOBBOX+JTTOTSO -mode=query -output_dir=%TC_TMP_DIR%
utility to query the database to find out how many UIDs will need to be processed for the complete
database (both bounding boxes and TSO files).
5. Validate the bounding boxes by sending an assembly to Structure Manager, adding the Bounding
Boxes column, and then expanding the assembly to a level that has geometry.
The column will be populated with the bounding box information.
If you delete bounding boxes, the operation removes the bounding boxes, multi-bounding boxes, and
the relations that link them together.
Depending on your requirement, you may run any of these commands:
• Run the create_or_update_bbox_and_tso -u=infodba -p=infodba -g=dba -delete_all_bboxes
command to delete all the bounding boxes in the database.
Note
Populating the queue generates entries into the PQSEARCHINDEXUPDATEENTRY
table for each bounding box.
This processes all updates of all bounding box UIDs, including the ones that already have index
boxes). Run the qsearch_process_queue command once in the following format:
qsearch_process_queue -u={USER_ID} -p={PASSWORD} -g={GROUP}
-force_queue_all_possible_updates.
When you want to process only the necessary updates (where index boxes are not generated
yet) or only add the bounding box UIDs of those that have not been processed, run the
qsearch_process_queue command in the following format:
qsearch_process_queue -u={USER_ID} -p={PASSWORD} -g={GROUP}
-force_queue_all_necessary_updates.
After processing the queue, it is recommended that you generate the database again to improve
search performance.
Process by UID
• Run the qsearch_process_queue utility in the following format to process all multiple UIDs
using a comma-separated list:
qsearch_process_queue -u={USER_ID} -p={PASSWORD} -g={GROUP} -process_queue
-uid=0$0F56myQyYmUC.
The following figure illustrates the process of how an NX dataset is created, saved, and the spatial
index, updated with Dispatcher setup.
1. When a geometry is saved, triggers are automatically set for creating bounding boxes and
TSO within the NX application. It also triggers a structure update to roll up the bounding box
information to its parent structure.
Note
If you would like to configure the QsearchProcessQueue Dispatcher translator as a
recurring request, set the following preferences as required:
• QSEARCH_queue_recurring_background_updates
• QSEARCH_recurring_background_update_survival_time
• QSEARCH_recurring_background_update_interval
If you want to reduce the objects getting added to the queue and also reduce the number of Dispatcher
requests, specify the item types you want to avoid in the QSEARCH_types_to_avoid_processing
preference.
o QSearchProcessQueue
Note
It is recommended that you use only one translator for the spatial search indexer.
• Set the QSEARCH_update_enabled preference to True if you want to generate TSO files.
The following figure illustrates the process of how a JT dataset is created, saved, and the spatial
index updated with Dispatcher setup.
1. When a geometry is saved, triggers are automatically set for creation of a JT file.
2. The JT file is created and it requests the Dispatcher to generate the bounding boxes and TSO
files.
3. The JT is loaded and the bounding box information is populated in the bounding box table. The
tables in the database are populated with the bounding box information.
Note
If you would like to configure the QsearchProcessQueue Dispatcher translator as a
recurring request, set the following preferences as required:
• QSEARCH_queue_recurring_background_updates
• QSEARCH_recurring_background_update_survival_time
• QSEARCH_recurring_background_update_interval
If you want to reduce the objects getting added to the queue and also reduce the
number of dispatcher requests, specify the item types you want to avoid in the
QSEARCH_types_to_avoid_processing preference.
• Identical revision and variant rules must be defined at all sites or searches may return inconsistent
results. Also, the content of these revision rules and variant rules must always be consistent
across all the sites.
• The content of saved queries must be consistent across all sites or searches may return
inconsistent results.
• You can only initiate the search in Design Context, not in Structure Manager or Multi-Structure
Manager.
• QS_remote_master_site_override
This preference allows the user to define a preferred remote site to make cacheless searches. It
must be defined in a format similar to the following example:
Product3:master_site3
Whenever you add a new product or assembly to remotely search in Design Context, the
administrator must update this preference with the new product and its owning master site at all
sites in the Multi-Site Collaboration network.
You do not need to manually configure IDSM to use remote cacheless searches. When you install
or upgrade the system using Teamcenter Environment Manager (TEM), it installs the callbacks
necessary for remote cacheless search. Each site participating in remote cacheless search must
install or upgrade the database using the same version of TEM.
Ensure that the following Oracle indexes are created for the best performance of cacheless search.
• PVARIANTEXPRESSION(POPERATOR,PFORMULA_STATE)
• PSOccurrenceNotes PPNOTE_TEXTS(UPPER(PVALU_0))
• PPSOCCURRENCE(RCHILD_ITEMU,ROCC_THREADU)
• PPSOCCURRENCE(RALTERNATE_ETC_REFU,ROCC_THREADU)
• PITEMREVISION(PUID,RITEMS_TAGU)
• PPOM_APPLICATION_OBJECT(ROWNING_GROUPU,PUID)
• PPEXPRESSIONS(PUID)
• PVARIANTEXPRESSION(POPERATOR, PUID)
Some common issues and how to troubleshoot them are included here for your reference.
• The lower the variation in geometry between different revisions of the same item, the better
the search engine performs.
• The greater the correlation between the product structure and the geometry breakdown, the
better the search engine performs.
• The accuracy of the search depends on the cell size you configure in NX or the voxel size in JT. A
small cell or voxel size provides more accurate search results, but smaller cell sizes result in
larger JT or TruShape files and response time takes more time.
• Avoid accumulating large number of entries in the indexing queue. The faster the updates are
processes, the sooner live updates are available.
• During the deployment process, monitor the size of the queue by periodically running the
qsearch_process_queue utility with the -list_queue option. If the queue search is increasing
steadily, you might have to reconsider your deployment strategy.
• TC_KEEP_SYSTEM_LOG=1
You can then examine the tcserver system logs, which show a system status summary, a list of
low-level call stacks, and the time consumed by each call. You can identify operations that consume
considerable time and report them to get help from us. If the search is slow because of database
issues, then get help from the database administrator.
Headquarters
Europe
Granite Park One
Stephenson House
5800 Granite Parkway
Sir William Siemens Square
Suite 600
Frimley, Camberley
Plano, TX 75024
Surrey, GU16 8QD
USA
+44 (0) 1276 413200
+1 972 987 3000
Asia-Pacific
Americas
Suites 4301-4302, 43/F
Granite Park One
AIA Kowloon Tower, Landmark East
5800 Granite Parkway
100 How Ming Street
Suite 600
Kwun Tong, Kowloon
Plano, TX 75024
Hong Kong
USA
+852 2230 3308
+1 314 264 8499