Universal Search in applications


K2BTools provides an easy way to use Full-Text Search in the generated systems. With this feature, we can offer the user a more fluid and appealing interface to make search queries.
When this feature is used a search option is included in the generated application, with the behavior described below.


In the application's Master Page, a field is displayed to enter search criteria.
Master Page search field

When the user completes this field, a redirection to a page containing the search results is executed.
Search results

The options available in the upper section can be used to see results belonging to a certain entity, such as customers, cities, etc. Clicking on the title of a result redirects the user to the corresponding Entity Manager.
This search mechanism accepts complex queries. For example, we can use terms such as “*@example.com”. In this case, it will return all the customers who have email addresses in the domain “example.com”.
The engine also accepts Boolean expressions such as “NOT Perez AND Manager”, which will return the entries containing the word Manager but not the word Perez. The queries accepted are documented on the GeneXus wiki page about this feature.

Security Checks

The following considerations are taken into account when running the query:
In order to make queries, the user must have permissions for the user activity K2BToolsSearchResult. If GAM integration is used, this permission will be K2BToolsSearchResult_Execute.
When showing the tabs to filter search results, the logged-in user permissions are considered, using K2BTools Security API.
During the search, this API is used to check if the user has access to the objects found.

Result format

All results contain the elements defined below.
Search result format

These elements are configured in each pattern instance. See How to configure Universal Search.

Extensibility and customization

This mechanism can be extended to include results that do not belong to transactions where K2BEntityServices is applied. 
Also, the user interface used to display the search results is fully customizable.
To extend or customize this feature, see Universal Search Extensibility and Customization

Index Management

The search engine can be managed from the K2BToolsIndexAdmin panel, which allows enabling the option to regenerate the indexes using the operation reindex-all.
In order to access management options, the user must have permissions to perform the user activity K2BToolsIndexAdmin. If GAM integration is used, the user must have the K2BToolsIndexAdmin_Execute permission enabled.