• Resolved amyelizdal

    (@amyelizdal)


    This is more of an expected functionality question, just to see if I’m maybe missing something in my own set up: if I have a post titled “Cupid’s” but a user searches for “Cupids” and turns up no results… is that normal?

    Is there a way I can index “Cupid’s” as both “Cupid’s” and “Cupids”?

    I have the default search operator as “AND” but the “OR” fallback is still enabled.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Mikko Saari

    (@msaari)

    See the Advanced indexing settings on the Relevanssi indexing tab. There are two options for apostrophes: “remove” and “replace with spaces”. If you choose “remove” and rebuild the index, “cupids” and “cupid’s” will become equal (but “cupid” may match worse, depending on your matching settings).

    Thread Starter amyelizdal

    (@amyelizdal)

    Hmm – I just tried that but it didn’t seem to make a difference.

    Plugin Author Mikko Saari

    (@msaari)

    It should, but it does require rebuilding the index. Did you do that? Can I see your site?

    Thread Starter amyelizdal

    (@amyelizdal)

    I did rebuild the index and I cleared all the site caches.

    My website is here: https://sweetestbakeryincanada.com/
    Cupid’s, Lynn’s, and Tait’s are a few of the bakeries that should be searchable either with or without the apostrophe.

    Thank you for your time on this!

    Plugin Author Mikko Saari

    (@msaari)

    No wonder it doesn’t work: there’s a small bug in Relevanssi. I’ll fix that in the next version, but if you want it fixed now, go download this file: https://www.dropbox.com/s/3jvvmm0zdeptcmy/common.php?dl=0

    and replace the lib/common.php file in Relevanssi with that.

    Then set the apostrophe setting to remove, reindex and enable partial matching in the searching settings, and you should be set.

    Thread Starter amyelizdal

    (@amyelizdal)

    Thank you for this! I was out of office for a couple days and today I was alerted about the plug-in update. Is this fix incorporated into that?

    If so, I just applied the update then set apostrophes to remove, I reindexed, and I do have partial matching enabled. I’m wondering if my “AND” setting is messing with the results? When I search for “cupids” or “lynns” I’m still not seeing any results, but I do see results for “cupid’s” or “cupid s” (etc).

    Plugin Author Mikko Saari

    (@msaari)

    No, the apostrophe indexing fix will be included in version 4.0.8, it’s not included in 4.0.7 yet. So just the update won’t help, you need the new file. Try that and let me know if it works any better.

    Thread Starter amyelizdal

    (@amyelizdal)

    This is working in most cases!

    My bakery’s “post titles” are generated based on a form submission by bakery owners all over Canada, so I can’t necessary control their keystrokes – but I’m wondering if now the last issue in this puzzle is the use of two different apostrophes: ’ versus ‘

    Example of search that still isn’t working:

    • Dooher’s
    • Dooher’s
    • Doohers

    But a search for Dooher does work. Thoughts?

    Plugin Author Mikko Saari

    (@msaari)

    Ok, figured it out – Relevanssi should handle all the different apostrophes the same, but I found one that was different, and always replaced by a space. That’s the case here.

    This version of the lib/common.php file should make the Dooher’s search work as well, once you reindex it: https://www.dropbox.com/s/3jvvmm0zdeptcmy/common.php?dl=0

    Thread Starter amyelizdal

    (@amyelizdal)

    So awesome – this all appears to be working now!

    Thank you so much for your attention to this. I really appreciate it!

    Plugin Author Mikko Saari

    (@msaari)

    Always fun to debug things that lead to a better product and benefits for all Relevanssi users.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Search results with or without apostrophes’ is closed to new replies.