Hi,
Trying to run a search on the odata service generated out of CDS view. But getting an error which says "Search not possible because the search scope is empty".
Attached screenshot of the same. Did not find any results on the internet for this error.
Could anyone point out how this is to be implmented?
Regards
Vaibhav Surana
Request clarification before answering.
In case someone is still struggling with this, you need to add the annotations that will allow some fields of the cds view to be searched as needed. For this error to go away, you need at least one field to be searchable.
Before the definition of the view, add this annotation:
@Search.searchable: trueThen before every field that you want to include within the scope of the search, add this annotation (example):
@Search.defaultSearchElement: true
--optional @Search.ranking: #HIGH
FirstName,
Repeat for all fields as desired.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.