5

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?

jhoepken
  • 1,842
  • 3
  • 17
  • 24
virender
  • 4,539
  • 5
  • 27
  • 31

1 Answers1

1

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!

kevlaria
  • 33
  • 5