Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4051

Fuzzy search in Oracle REST SODA

$
0
0

I am trying to do a fuzzy search using rest from a c# script and have tested a few different ways without success.

This payload works:

string payload = "{ \"name\" : \"Peter\"}";

...which is a normal search after the name "Peter".

However, when trying to do a fuzzy search using the following payloads:

string payload = "{ \"q\": { \"name\": { \"$regex\": \".*Peter.*\" } } }";

Response:

Success response from DB: {"items":[],"hasMore":false,"count":0}

Next:

string payload = @"        {""q"": {""name"": { ""$like"": ""%Peter%"" }            }        }";

Result:

Success response from DB: {"items":[],"hasMore":false,"count":0}

Next:

string payload = @"        {""q"": {""$textContains"": {""name"": ""Peter""                }            }        }";

Result:

DB Error: BadRequestResponse: {"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1","status":400,"title":"The field name $textContains is not a recognized operator.","o:errorCode":"SODA-02002"}

Any help is highly appreciated.


Viewing all articles
Browse latest Browse all 4051

Trending Articles



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