Search

The Search component allows you to search in a data source or in all the texts of your application. Display the list of results in a custom list using the Collection List component. 

In this article

Insert an input field

Insert the Search component. This component is not visual, it is available from the Objects list. 
Insert a Text input component to create the input field. 
Select this component and create an action to launch the search: 
On validated > Interact with a component > Search > Search

In the Search term field, select the object of the search, i.e. the value of the field.

💡 You can activate the Live Validation of the Text input component or add a button to validate the entry.


Configure search

Let's take the example of a search within a real estate catalog. If the user types pool, do you want this search to target the Name, Address, Description... fields of your database? Do you want the results of the query to appear if the user types in "pool" instead of "swimming pool"?
Now you have to configure the query, specify the data source and define the fields on which it will be performed. You have options to set the flexibility of the result matching. 

Choose the source

Go to the Properties window of the Search component. 
Click on Source and choose your data source: the data provider, an HTTP component etc...

If you want to search through all the texts in the application, select the project and the field All texts:

Choose search fields

Double click on the component Search to view the results of your query. 

Click on the fields on which the search will be performed: they appear at the top of your screen. 

Other options

In the Properties window, you can customize the other parameters of the search.

Tokenization

Within a search engine, tokenization is the process of splitting text into “tokens”, both during querying and indexing. Tokens are the basic units for finding matches between queries and records. Define the flexibility of partial matches:

  • Whole word search: indexes whole words (soccer)
  • Partial search (forward): progressively indexes words in the forward direction (soccer)
  • Partial search (backward): progressively indexes words in the backward direction (soccer)
  • Search all possible combinations: indexes all possible combinations (soccer)

Matches

Define phonetic matches:
  • Non-sensitive: not case sensitive
  • Simple: phonetic normalization
  • Advanced: phonetic normalization and literal transformations
  • Extra: phonetic normalization and soundex transformations
Here are these different options put in situation with the query "Björn-Philipp Mayer" :
Requête Non-sensitive Simple Advanced Extra
björn Yes Yes Yes Yes
bjorn No Yes Yes Yes
philipp No No Yes Yes
byorn mair No No Yes  Yes

Limit results 

Choose the maximum number of results to be displayed in the search.


Display results

To display the search results, you have two options: 
  • Either you want to display only the results of the search
  • Or you want to filter the list of all items with the search 

Option 1: Display only the results

This option is the easiest to configure. To display only the list of results, you must create a new collection whose source is the Search component. 
Insert a Collection List component and in the Source field, select From a component

For each element, select Source and define this data binding. For the By Id function, bind the Identifier with the'ID of the current element.

Option 2: Filter a list with search

This option involves creating a filter on the entire list of assets.

Insert a component  Collection/List and in the Source field, select From a component: choose your data source.

For each item, select  Source and define this data binding. For the By Id function, bind the'Identifier with the ID of the current element.

Add a Filter on the Collection / List component. 

Still need help? Contact Us Contact Us