CDS Annotations

CDS: Search Annotations – Search.searchable

Annotations enrich the CDS views but can be confusing as well. These series of blogs have my simplified explanation.

Search.searchable is a header annotations meaning it appears before actual select is written. The possible values are true and false and the default value is true.

Syntax

@Search.searchable : true
Or
@Search.searchab
le : false

Explanation: This annotation is generally relevant for Fiori Elements and is used in the consumption view. When added to the consumption view, it creates a general search bar.

Example: For Fiori element, if you don’t want general search (marked in the red box) to come, you need to set this Search.searchable as false. (The default is true – remember). This example also shows, why it is necessary to use this annotation only in the consumption view (the one which is exposed to the external interface).

Search.searchable is along with some other annotations which further help to define the Elements, which columns are included in the generic search. Those annotations are following:

Search.defaultSearchElement

Search.ranking

Search.FuzzinessThreshold

Follow the links to see how the deep the rabbit hole is.

Leave a Reply

Your email address will not be published. Required fields are marked *

error

Enjoy this blog? Please spread the word :)

Follow by Email
Twitter
LinkedIn
LinkedIn
Share