Show TOC

Defining Model QueriesLocate this document in the navigation structure

Use

You can define the attributes the system is to use for searching for the business object. This definition is called a query (search pattern). You can define multiple queries within one model.

The system generates a default query that contains all the selected response attributes of all the nodes in the model. You can change the default query by adding or deleting attributes. You can also create additional queries. You can choose the query attributes from any node of any business object that is linked directly or indirectly to the model you are modeling.

In this way, you can define simple and complex queries for a model. The query that you define as the default query is the one that is used by default on the Search UI. In the case of an advanced search, the user can choose any additional search queries defined here in the Search Form field.

Example

You can define that the user can search for a city name to see all the sales orders for customers located in this city. You can also add to a sales order template the possibility to search for it by the city in the customer master data.

Procedure
  1. If there is no search query, you can automatically generate the default search query with all response attributes. Choose Generate Default Query to do this.

    If you later want to use a different query as the default search query, set the indicator for the Default Query flag in the row of the query you now want to use.

  2. To create another search query, choose Create and enter a name and description for the query in the Name and Description columns respectively.

    Example

    Name: CUST_BY_NAME

    Description: Search customer by name

  3. Select the search query.

  4. Choose Add in the Details: Attributes of Query ' <request_name>' area.

    To create an attribute, choose Attributes/Groups of Node.

  5. The Select Query Attributes dialog box appears.

    Select a node in the Templates and Nodes area.

    Select an attribute or several attributes in the Details: Attributes of Node ' <node_name>' area and choose Select. If you have already created an attribute group in the Create Node step in the roadmap, you can reuse it here.

    Note

    The attribute name is the technical name of the attribute. This is used during the attributes search, although the technical name or the description can be displayed.

  6. Optional: Work through this step if you want to subsequently change the reference attribute entered.

    Click Choose Path and choose the attribute for the reference node you require. The name and description of the reference attribute appear in the table.

  7. Optional: Group attributes in attribute groups.

    You can group the response attributes for a search query in attribute groups. These are displayed in the search results for advanced searches, for example in the combination Price+Currency, thus 100 EUR for example.

    To create a group, choose Start of the navigation path Add Next navigation step Group End of the navigation path.

    To add an attribute or another group to a group, choose Start of the navigation path Add Next navigation step Assignment to Group End of the navigation path. Select the attribute or attribute group that you want to add and choose Choose.

    Choose Move to move an entry up, down, to the end of, or to the start of the group.

    To remove an attribute that is no longer required in a group or to delete a selected group, choose Remove.

  8. Optional: Specify whether or not the search can be narrowed down (refined) using filtering based on this attribute.

    To allow users of the advanced search to use this attribute for filtering, select the Int. Navigation checkbox.

  9. Optional: Specify the relevance of the attribute.

    To influence the location of items in the search results list, you can vary the weighting of the attribute for this search query in the Relevance column. You can assign a higher or lower weighting to the attribute. The higher the weighting of the attribute, the more influence it has in the calculation of the relevance of an item. Items with a higher relevance are located higher up the search results list.

    Example

    In the case of a search query that comprises the attributes First Name and Last Name, you can set the relevance for the Last Name attribute to high and the relevance for the First Name to low. During a search for a name, the system would then display the items for which the search found a hit in the Last Name attribute higher in the search results than the items for which the search found a hit in the First Name attribute.

    Note

    Note that other factors play a role in the calculation of the relevance, such as the frequency and order of the attributes in the structure.

  10. Optional: Assign cross-model attributes to the query attributes for the default query.

    You have already created cross-model attributes. More information: Managing Cross-Model Attributes

    1. Select the default query.

    2. Select one attribute in the default query.

    3. In the right-hand screen area Details: Assigned Cross-Model Attributes, choose the Add function.

    4. In the list of all cross-model attributes, select one or more attributes and choose Choose.

    To revoke the assignment of a cross-model attribute, choose the Remove function.

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

When you have completed the definition of the model, you can create search object connectors based on this model.

More information: Defining Node Responses