Query string with apostrophe in cloud search

I have a 'Vick's' string that I need to pass to the cloud search using the API. But when I pass its API, it throws an error. When I use 'Vick's' instead of Vick's as a search string, it does not give an exact result. Search on the other hand 'Vick%27s' working fine.

When I'm in the Amazon and doing some searches there, they are great for "Vick's" and "Vick\'s" . "Vick\'s" I use the Amazing Cloud Search wrapper, which is written in C #.

My question is: how to request a string with an apostrophe in cloud search?

+5
source share
1 answer

You need to add a slash (\). And if you use Java and you do replaceAll, you need to do something line by line .replaceAll ("'", "\\") (4 slashes - although only 2 appear here!).

Hope this helps!

0
source

Source: https://habr.com/ru/post/1245290/


All Articles