Adding Attributes to a Business Object Type

When you add a new attribute for a type in your database, you also need to update the CloudView server index with the new attribute. You can add the new attribute to the config.xml file and run the update searchindex MQL command.


Before you begin:
  • Add the new attribute for the type in your database using MQL. For more information, see the MQL Guide.
  • Open your working config.xml file or the file that used for the indexing process. The default config.xml file is in:SERVER_INSTALL\Apps\BusinessProcessServices\VERSION\Modules\ENOFramework\AppInstall\Programs.
  • Review Config.xml Parameters for information on the different parameters used in the file.
See Also
About the Index Configuration File
Adding Applications
Adding Business Object Types
Adding Business Types Files and File Extensions
Using Aggregation Rules
Reference Information: MQL Indexing Commands
  1. To add a new attribute to a business object type, add a FIELD parameter under the BOTYPEFIELDS parameter for that type.

    Note: Do not use TEXT as FIELD name. This value is already used by default.
    For example, you can add the Weight attribute to the Part type, by adding a FIELD parameter for Weight under the BOTYPEFIELDS for Part:
    <BOTYPEFIELDS name="part" application="ENG">
      <FIELD name="WEIGHT" select="attribute[Weight]" type="NUM,PARAMETRIC"/>

  2. Define the MQL select command (or JPO method) to fetch the new attribute value with the select parameter.

    For example, use the MQL select="attribute[Weight]" to fetch the value for Weight:

    <FIELD name="WEIGHT" select="attribute[Weight]" type="NUM,PARAMETRIC"/>

  3. Define the field type parameter to determine how to query and store the attribute. Choosing the correct field type for an attribute can greatly improve search performance.

    For example, use the NUM,PARAMETRIC field types for Weight:

    <FIELD name="WEIGHT" select="attribute[Weight]" type="NUM,PARAMETRIC"/>

    Use the following table to define the correct field types to apply to attributes.

    Field Type Description
    STRING Use this field type for attributes that have strings or sequences of alphanumeric characters for values. String fields do not impact memory usage or indexing performance. You can also define string fields as PARAMETRIC.

    For example, define the REVISION attribute as STRING since its values are often sequences of alphanumeric characters:

    <FIELD name="REVISION" select="revision" type="STRING,PARAMETRIC"/>

    NUM Use this field type for attributes that have integers for values. You can also define numeric fields as PARAMETRIC.

    For example, define the WEIGHT attribute as NUM since its values can only be numbers:

    <FIELD name="WEIGHT" select="attribute[Weight]" type="NUM,PARAMETRIC"/>

    DOUBLE Use this field type for attributes that have real numbers for values. Since Double fields can have a large number of unique values, do not define Double fields as PARAMETRIC.

    For example, define the ESTIMATED COST attribute as DOUBLE since its values can only be real numbers:

    <FIELD name="ESTIMATED COST" select="attribute[EstimatedCost]" type="DOUBLE"/>

    DATE Use this field type for attributes that have dates for values. You cannot define Date fields as PARAMETRIC for Navigation and Advanced mode.

    For example, define the ORIGINATED attribute as DATE since its values can only be dates:

    <FIELD name="ORIGINATED" select="originated" type="DATE"/>

    BOOLEAN Use this field type for attributes that have either true or false for values. You can also define Boolean fields as PARAMETRIC.
    STRING|DATE|NUM|BOOLEAN,PARAMETRIC Use the PARAMETRIC field type in addition to either STRING, DATE, NUM, or BOOLEAN.

    You can define any attribute as parametric. Use the parametric field type for guided navigation in the search results. Parametric attributes display in the left-side navigation and filter bar of the Search page. You can use these attribute values to further refine a query.

    Note: Parametric fields have an impact on memory usage and indexing performance. They also increase disk usage. For performance reasons, do not define as PARAMETRIC any attribute that could potentially have more than 200 values. Parametric fields with thousands of potential values negatively impact performance. Parametric means that 3DSpace Index tracks and remembers all the potential choices for that field across all relevant information.

    You can characterize Parametric fields by a finite number of values that might be present in the GUI chooser. For example, you can define the Color attribute as Parametric, since it has a limited number of possible values: red, blue, green, etc. On the contrary, do not define the Modified attribute as parametric, since there are potentially an unbound number of possible choices.

    For example, define the OWNER attribute as PARAMETRIC, since it has a finite number of possible values (there are a finite number of people defined in your company):

    <FIELD name="OWNER" select="owner" format="user" type="STRING,PARAMETRIC"/>

    CLASSIFICATION

    Use this field type to configure specific "classification" attributes to display in the left-side navigation and filter bar of the Search page. Classification fields are a special type of parametric field only visible when browsing to a leaf node of a library taxonomy.

  4. Using MQL, specify the context and apply the config.xml file.

    For more information, see Applying configuration.

  5. Update the index with the new attribute, by running the update searchindex command in MQL.

    update searchindex type TYPE;

    For example, to update the index with the Weight attribute for the Part business object type, run the following command:

    update searchindex type Part;

  6. Reload the cache in the Search UI to read in the new config.xml file.
  7. Open the Search page to see the new attribute.