Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: Fuzzy Search with OData Service via XS Engine

$
0
0

Yes, you can combine them as you choose...

 

If you modify the  @Search.fuzzinessThreshold and set it to 0.2 you will also get the unrelevant matches.

Example:

URL:

service.xsodata/Companies/?$format=json&search=Koelnerstr.

Response:

{
"d": {
"results": [
{
"__metadata": {
"type": "users.i320500.oDataFuzzySearch.service.CompaniesType",
"uri": "http://p720.dmzzrh.sap.corp:50106/users/i320500/oDataFuzzySearch/service.xsodata/Companies(7)"
},
"ID": 7,
"@com.sap.vocabularies.Search.v1.Ranking": "0.8199683",
"COMPANY_NAME": "Kölner Strasse"
}
]
}
}

For your last question: you do not have to place my code into the xsOData-file, this is a CDS-Artifact, which means that you design / create a table at design-time. You need to first create a table using the code in a Name.hdbdd-file.

I am sure you can also add the Fuzzysearch-nes to a table using SQL but I don't know the syntax right now. But the table needs to be Fuzzy-Search-Aware!

 

Hope that helps.

best Regards,

Jan


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>