I have string 'Vick's'
that I need to pass to the cloud search using the API. But when I passing it to the API it throws an error. When I am using 'Vick's'
instead of Vick's
as a search string it is not giving exact result. The search for on the other hand 'Vick%27s'
is working fine.
When I am in the Amazon and doing some searches there, they turn out fine for "Vick's"
and "Vick\'s"
. I am using Amazing Cloud Search wrapper, which written in C#.
My question is: How to querying string with apostrophe in cloud search?
You'll need to prepend your ' with a slash (\'). And if you're using Java, and you're doing replaceAll, you'll need to do something along the lines of .replaceAll("'", "\\'") (4 slashes - even though only 2 appear here!).
Hope it helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With