Skip to Content

SAP HANA CDS Fuzzy Search not working

Feb 19 at 06:01 AM


avatar image

I have a hdbdd defined as below, but the fuzzy search i tried using this search query as doesn't works.$format=json&search=singaporw

Only maps to full text. E.g. "singapore" instead of "singaporw" or "sing"

namespace xxx;
@Schema : 'XXX'

context fuzzysearch {

    @Catalog.tableType : #COLUMN
    entity ADDRESS {
        key id  : Integer;
        street  : String(80);
        zipCode : Integer;
        city    : String(80);

        @SearchIndex.text.enabled   : true
        @SearchIndex.fuzzy.enabled  : true
        country : String(80);


    @Search.searchable: true  
    define view V_ADDRESS as select from ADDRESS as ADDRESS {  
        @EnterpriseSearch.key : true ,  

        @Search.defaultSearchElement: true  
        @Search.ranking: #HIGH  
        @Search.fuzzinessThreshold : 0.7 
10 |10000 characters needed characters left characters exceeded

Just tried that with SP12 and it seems to me that the search against the entity is always executed with fuzzinessThreshold=1.

So, maybe it would be an option to just expose the view? With that approach even partial matches were returned in my test.

* Please Login or Register to Answer, Follow or Comment.

0 Answers