Returns:

Examples

Simple search for the term "basic" in view J_EPM_PRODUCT. If the term is
found in a column marked in the view as freestyle search relevant, the content of columns
in the attributes array is returned, in this case PRODUCT_ID, TEXT, CATEGORY, PRICE,
and CURRENCY_CODE. The return attributes do not have to be marked as freestyle search relevant though.
Note that the suggestion query does not make use of the freestyle search relevant property.
So if you set this property to false in the view, you will not get a search result using a suggestion as search term.

The same search as in the previous example but now with term highlighting. If the term
"basic" is found in the TEXT attribute, it will be returned as <b>basic</b>.
The parameter maxLength defines the length of chars to be returned.
The parameter startPosition defines start position of chars to be returned.
The maxLength and startPosition parameters can be omitted. In this case, the default values
shown in the example below are used.

The same search as in the previous example, but now with the snippet function. If the term
"basic" is found in the TEXT attribute
the content is shortened and will begin and end with three dots (...)
In addition to the snippet, the search term is highlighted the same way as in the highlighted function (see previous example).
It is therefore not necessary to use highlighted and snippet for the same attribute.

Parameters:

Returns:

Example

Getting suggestions asynchronously for attributes CATEGORY and PRODUCT_ID.
Note that, other than the search query, the suggestion query does not make use of the freestyle search relevant property set in the view.
So if you set this property to false in the view, you will get a suggestion but a search using the suggestion as a search term will show no results.