cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HANA CDS Fuzzy Search not working

Former Member
0 Kudos

I have a hdbdd defined as below, but the fuzzy search i tried using this search query as doesn't works.

https://xxxxxxxx.xxx.xx.xxxxx.com/xxxxx.xsodata/LandValue?$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  
        ADDRESS.id,  

        @Search.defaultSearchElement: true  
        @Search.ranking: #HIGH  
        @Search.fuzzinessThreshold : 0.7
        ADDRESS.country 
    };  
};
lbreddemann
Active Contributor
0 Kudos

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.

Accepted Solutions (0)

Answers (0)