• Resolved loganstrike

    (@loganstrike)


    On the website below, typing a search for “dog’s” on iPhone/iOS devices return zero results, apparently because iOS uses smart apostrophe (aka typographer’s apostrophe) instead of a straight apostrophe. I see in the Agolia documentation that straight apostrophes are removed via Normalization during search queries and indexing, however the smart apostrophes do not appear to be handled the same way, resulting in zero results.

    Here is a link to the search results using a straight apostrophe (the apostrophe is removed from the search term by the system before results are displayed, showing correct results):

    https://gobookfair.com/search/dogs/

    Here is a link to the search results using a smart apostrophe as entered in the search form from an iOS device. You can also simulate this on desktop devices by entering a smart apostrophe instead of a straight apostrophe (no results)

    https://gobookfair.com/search/dog%E2%80%99s/

    Do you have any suggestions on how to get around this issue with iOS devices using smart apostrophes? Thank you for your time!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Thank you for your patience.

    Hmm, not sure what to suggest for this outside of anything related to sanitizing and removing the apostrophes before sending to Algolia.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    @loganstrike Did you ever figure out a solution that worked out in the end?

    Thread Starter loganstrike

    (@loganstrike)

    @tw2113 I used the parse_query hook to catch the search query and remove curly single quotes. For some reason, this seems to have resulted in straight single quotes becoming URL encoded before reaching Algolia’s normalization, so I also had to remove straight single quotes in my custom function. I’m not sure if this is the best approach, but it appears to have solved the immediate issue. Thanks!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    A case where I usually say “whatever gets the job done”.

    Let us know if you need anything else.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.