Show TOC

Procedure documentationDefining Node Relationships Locate this document in the navigation structure

 

Once you enter this step in the roadmap, all the nodes that you have previously selected and defined are listed on the same level. You arrange the nodes in a hierarchical structure by defining relations between the nodes, either as a composition within the search object connector template or as an association to other templates in the same software component.

Note Note

An association defines a relationship between nodes in different object templates. In contrast, a composition defines a relationship between nodes in the same object template.

Associations and compositions form a network of nodes. This network of nodes is used during the assignment of response attributes and request attributes that belong to other nodes. Authorization paths also use the network of nodes.

End of the note.

In either case, the link between the nodes is defined by their foreign keys. The system uses the identical names of the node attribute to generate a proposal for the foreign key description.

Procedure

Defining Compositions
  1. Select the superordinate node under which you want to define a child node.

  2. Choose Create Composition. An extra row is displayed in the table.

  3. In the lower list in the window, choose the node that you want to define as the subordinate node.

  4. Define the composition properties:

    1. Assign a cardinality to the child node:

      Arbitrary: 0..n – the child node can have an arbitrary number of instances below the parent node.

      Up to one: 0..1 – the child node can have a maximum of one instance or none at all below the parent node.

      Exactly one: 1..1 – the child node must have exactly one instance below the parent node.

      At least one: 1..n — the child node must have at least one instance under the parent node.

      The system automatically assigns an inverse cardinality of exactly 1 to the subordinate node.

    2. Optional: Select the checkbox in the Subquery if you want to use 1:n search queries in the details view of a search hit. You can then start further search queries from the table in the details view.

  5. Define the foreign-key relations for the child node.

    Note Note

    If there are attributes with identical names in the parent node and child node, the system assigns them to each other automatically.

    End of the note.
    1. Select the child node for which you want to define the foreign-key relations in the node structure in the part of the screen.

    2. Click into the Attributes of Parent Node '<parent_node_name>' column in the lower screen area, Details: Foreign Key of the Key '<node_name>', and choose F4 to display the available attributes for the parent node.

    3. Select an attribute from the list.

    4. Click into the Attributes of Child Node '<child_node_name>' column and choose F4 to display the available child node attributes.

    5. Select a matching attribute from the list. It must have the same type as the selected parent attribute. The target node attribute can be longer than the source node attribute but not the other way round. If the selected attributes are not compatible, the system issues an error. If the two attributes have different lengths, the system issues a warning.

Note Note

You can delete a defined composition by selecting the relevant child node and choosing Delete. In this way, the structure information defined is deleted, but not the node itself. You can remove nodes only in the Define Nodes step of the roadmap.

End of the note.
Adding Associations
  1. Select a node from the node structure. This may be the root node or a child node.

  2. Choose Create Association. An extra row is displayed in the table.

  3. In the lower list in the window, choose the target node within this template, on the basis of which you want to define an association.

  4. Define the association properties:

    1. Enter a unique name for the association.

    2. Assign a cardinality to the child node (for the values, see above under Defining compositions):

    3. Assign a reverse cardinality to the child node.

      The cardinality in the perspective from parent node to child node can differ from that in the perspective from the child node to the parent node.

      Example Example

      A material that is associated with one plant while the same plant is associated with more than one material.

      End of the example.
    4. Select the check box in the Detail UI column if you want attributes of this node to be displayed in the detail area of the Search UI. The use of this propertiy depends on the application using SAP NetWeaver Enterprise Search.

  5. Define the foreign-key relations for the associated nodes.

    Note Note

    If there are attributes with identical names and types in the associated nodes, the system assigns them automatically.

    End of the note.
    1. Select the assigned node for which you want to define the foreign-key relations in the node structure in the part of the screen.

    2. Click into the Attributes of Parent Node '<parent_node_name>' column in the lower screen area, Details: Foreign Key of the Key '<node_name>', and choose F4 to display the available attributes for the parent node.

    3. Select an attribute from the list.

    4. Click into the Attributes of Child Node '<child_node_name>' column and choose F4 to display the available child node attributes.

    5. Select a matching attribute from the list. It must have the same type as the selected parent attribute. The target node attribute can be longer than the source node attribute but not the other way round. If the selected attributes are not compatible, the system issues an error. If the two attributes have different lengths, the system issues a warning.

  6. To move to the next step in the roadmap, choose Continue.

    More information: Defining Model Queries