3

I'm running into a problem with the search REST API. When my refinement filter parameter contains a French character I get zero results.

For example this works:

https://www.example.com/sites/company/_api/search/query?querytext='*'&refinementfilters='TheCity:equals("Vancouver")'&sourceid='b09asdf0-05ea-4375-8asd-asdfasdfasdfasdf'&clienttype='ContentSearchRegular'

But this doesn't work:

https://www.example.com/sites/company/_api/search/query?querytext='*'&refinementfilters='TheCity:equals("Île-des-Soeurs")'&sourceid='b09asdf0-05ea-4375-8asd-asdfasdfasdfasdf'&clienttype='ContentSearchRegular'

1 Answer 1

3

You need to encode your query component. You can test it by running encodeURIComponent in a browser console or use any online tool like this one.
So you query should be:

https://www.example.com/sites/company/_api/search/query?querytext='*'&refinementfilters='TheCity:equals("%c3%8ele-des-Soeurs")'&sourceid='b09asdf0-05ea-4375-8asd-asdfasdfasdfasdf'&clienttype='ContentSearchRegular'

1
  • That makes sense, but it doesn't work for me.
    – matt
    Commented Jan 9, 2017 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.