This annotation marks a view as searchable. You define the fuzziness threshold as well as the specifics of term mappings at element level.
@Scope:[#VIEW, #TABLE_FUNCTION] Annotation Search { searchable : Boolean default true; }; @Scope:[#ELEMENT] Annotation Search { defaultSearchElement : Boolean default true; ranking : String(6) enum { HIGH = 'high'; MEDIUM = 'medium'; LOW = 'low'; } default #MEDIUM; fuzzinessThreshold : Decimal(3,2); termMappingDictionary : String(128); termMappingListID : String(32); };
Annotation | Meaning | |
---|---|---|
Search.searchable |
Defines if a CDS view or entity is generally relevant for search scenarios. This annotation must be set in case other search-related annotations are being defined for elements of the respective CDS view or entity. The annotation offers a general switch and a means to quickly detect whether a view is relevant or not. Scope: #View Evaluation Runtime (Engine): Interpreted by Enterprise Search and SADL Values: |
|
Value | Description | |
Boolean (true, false) |
Defines whether a view is relevant for search or not. Default: true |
|
Search.defaultSearchElement |
Specifies that the element is to be considered in a freestyle search (for example a SELECT…) where no columns are specified. Usually, such a search must not operate on all elements – for performance reasons, and because not all elements (e.g. internal keys) do qualify for this kind of access. Scope: #Element Evaluation Runtime (Engine): Interpreted by Enterprise Search and SADL Values: |
|
Value | Description | |
Boolean (true, false) | Defines weather the element is to be considered in a
freestyle search. Default: true |
|
Search.ranking |
Specifies how relevant the values of an element are for ranking, if the freestyle search terms match the element value. Scope: #Element Evaluation Runtime (Engine) : Interpreted by Enterprise Search Values: |
|
Value | Description | |
HIGH | The element is of high relevancy; this holds usually for ID and their descriptions. | |
MEDIUM | The element is of medium relevancy; this holds usually for other, important element. This is the default. | |
LOW | Although the element is relevant for freestyle search, a hit in this element has no real significance for a result item's ranking. | |
Search.fuzzinessThreshold |
Specifies the least level of fuzziness (with regard to some comparison criteria passed at runtime) the element has to have to be considered in a fuzzy search at all. Note
A fuzzy search enables a certain degree of error tolerance and returns records even if the search term contains additional or missing characters or other types of spelling errors. Note
To perform a fuzzy search you have to set the search mode to fuzzy in the customizing settings of your ABAP system. Find the customizing node under . If in the customizing a value for Fuzzy Similarity is present, the value of the parameter Search.fuzzinessThreshold will become void. Scope: #Element Evaluation Runtime (Engine): Interpreted by SADL Values: |
|
Value | Description | |
Decimal (3,2) |
The least level of fuzziness the element has to have to be considered in a fuzzy search at all, e.g. 0.7. The value can be between 0 and 1. We recommend using the default value 0.7 to start with. Later on, you can fine-tune the search settings based on your experiences with the search. You can also fine-tune the search using feedback collected from your users. A value between 0.7 and 0.99 would be most useful. Use 1 for exact matches. |
|
Search.termMappingDictionary |
Specifies the table that holds the term mappings (synonyms) to be considered in the context of a search on this view. Scope: #Element Evaluation Runtime (Engine): No engine usage right now. Reserved for future usage. Values: |
|
Value | Description | |
String(128) |
Defines the term mapping dictionary, e.g. a table or entity. |
|
Search.termMappingListID |
Specifies one or multiple list IDs within the term mapping dictionary mentioned before. The list is implemented as a column of the term mapping table, with the list ID as content of this column. This concept has the aim to enable overarching term mapping dictionaries while being able to separate domain-specific content at the same time. Scope: #Element Evaluation Runtime (Engine): No engine usage right now. Reserved for future usage. Values: |
|
Value | Description | |
Array of String(32) |
Defines one or more columns of the term mapping dictionary. |