cancel
Showing results for 
Search instead for 
Did you mean: 

Using fuzzy search with CDS in freestyle app

mark05
Explorer
950

Hey community,

I've a question regarding the fuzzy search annotation. I know that it is possible to use the following annotations to enable fuzzy search on HANA:

  • @Search.searchable : true
  • @Search.defaultSearchElement : true
  • @Search.fuzzinessThreshold : 0.8

But that approach only works, if the request from the UI comes with an search query. This works fine for Fiori Elements apps. But how should that work with freestyle apps? If I'm implementing a custom search bar with an event handler, my only option is to create filters on the binding of the container, which holds the data. And that leads into filter queries in the oData request. And the filters are not working with the search annotations...

Is there any way to trigger a search query from the UI binding? Or is there another approach for implementation with filters? (Except from using manual ABAP coding, I know that this would work, but it's not what I want).

We're using referenced data source to map the CDS views into the SADL framework of the SEGW, so using the oData: publish annotation from this blog-post, would also not work in my opinion.

I am glad about every hint, thank you!

Best regards,

Mark

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

Answers (2)

Answers (2)

mark05
Explorer
0 Kudos

Hey Arnab,

yes I was able to solve it with the following logic:

oTable.bindAggregation("items", {
    path: sPath,
    parameters: {
        custom: {
            search: sSearch
        }
    },
    ...
});

arnabdatta3
Participant
0 Kudos

I am also having the same problem. mark.deppe Were you able to solve it?