How to configure Universal Search


Some properties are included in the pattern instance to configure the Universal Search in applications feature. These properties only affect the generation of search dialogs.
These properties are included in the pattern K2BEntityServices.

Instance Properties

The following properties are included in each pattern instance.

In the instance root node

"Entity Image" property

The “Entity Image” property is included in this node. The content of this property should provide an overall description of the elements in the corresponding entity. It is used in some cases as an icon for the result of the query if the record to show doesn't have an associated image.

In the Transaction node

This node is used to set the properties that define if the entity should be included in query results produced by the universal search engine. If it does, it indicates how results should be displayed.
New properties in the Transaction node

These properties and their use are described below.
  1. Searchable: This property determines whether the instances of this transaction will be included in the search engine. Its value is copied to the “Searchable” property of the GeneXus transaction. Given that a transaction can only be included in the search engine when it is a Business Component, the property is displayed only in this case.
    If the property value is “False”, the generation of search dialogs for the transaction is disabled. For this reason, all other properties related to this feature are hidden in this case.
  2. Search Result Title: This property indicates the title to be displayed in the search result. The default value is the Description Attribute of the transaction, if it exists.
  3. Search Result Displayed Image: This property determines whether to use an image attribute (defined in the following property) as an image for the results of this entity, or the image corresponding to the entity (defined in the instance root node). The possible values for this property are as follows:
    1. Object Only: The attribute of the object being viewed will always be used.
    2. Entity Only: The image corresponding to the instance will always be used.
    3. Prefer Object: The object's attribute will be used as long as it has a valid non-empty value; the image corresponding to the entity will be used in all other cases.
  4. Search Result Image Attribute: This property determines which attribute will be displayed as search result image. The use of this property is conditioned to the value of the “Search Result Displayed Image” property. The default value is the Image Attribute of the transaction, if it exists.
  5. Show BC Preview as Result Description and Search Result Description: The property “Show BC as Result Description” indicates whether a preview of the BC should be used as a description of the result. If so, the highlighting feature included in GeneXus is used. When it isn't used, this description is taken from the attribute indicated in the property “Search Result Description”. This allows defining descriptions based on the value of a transaction attribute. It can also be used to create descriptions made with formula attributes.

K2BEntityServices settings properties

The properties included in the settings object of the K2BEntityServices pattern are described below.
"Searchable" property in the configuration of Entity Services

The “Searchable” property is included in the “Transaction” node. The value of this property is taken as default by the property with the same name in the Pattern instance. This property can be used to globally enable or disable the inclusion of transactions in the index.
"Search Viewer" and "Search Get Data Procedure" properties

Two new properties have been included in the “Objects” node: “Search Viewer” and “Search Get Data Procedure”. These properties can be used to change the name of the generated objects.