All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Search terms with apostrophes

electriclabs 14 Aug 2012 15:03 question, complete

Hi Low,

We've got an issue with a search term and I was wondering if you could shed some light on it (I R CONFUZED).

Page content: Jamie's Farm

Search mode = all

Search term: Jamie's = 1 result
Search term: Farm = 1 result
Search term: Jamie's Farm = 0 results

I'm guessing it has something to do with the apostrophe but I can't figure it out. Is there any workaround/fix for this?

Thanks,

Rob

Replies

  1. Low 15 Aug 2012 07:56

    Hi Rob,

    it should give back a result, but if you have little content in the site so far, the search index can be somewhat flakey. It has to do with how MySQL's fulltext indexing works. As soon as there's more content in the site, then search results will get better. Or is there already lots of content in the site?

  2. electriclabs 15 Aug 2012 09:20

    Hi Low,

    In that channel there are currently only 24 entries but in the site in general there is lots of content in the site. Is it collection dependent?

    Thanks,

    Rob

  3. electriclabs 15 Aug 2012 16:04

    Hi Low,

    I've done a bit more digging. If you just have the words "Jamie's Farm" in the wygwam (unformatted) it finds it fine. If you wrap it in an <a> tag it produces the scenario above.

    You can see the entry here: http://esmee.epwebsites.co.uk/news-an...

    Wygwam does encode the apostrophe to ' but I'm not sure that's an issue as a search for "jamie's" will return the page just fine.

    Does this shed anymore light on the issue?

    Thanks,

    Rob

    edited: for formatting of <a> tag

  4. Low 16 Aug 2012 15:27

    Apologies for the time it takes me to respond -- I'm on holiday at the moment, only checking support once a day. Normal support will resume next week.

    All punctuation, including apostrophes, are filtered out (replaced by spaces) in the index and for each search term. Maybe something else is happening in Wygwam fields... You could check the Low Search Index table, and see how it's being stored in the DB.

    Also check template debugging and look up all the lines starting with Low Search. What does that say?

  5. electriclabs 21 Aug 2012 15:14

    Hi Low,

    No problem, here are the details:

    Low Search Index: jamie s farm

    Channel Data: <a href="http://www.jamiesfarm.org.uk/&#x0022; target="_blank">Jamie&#39;s Farm</a>

    {exp:low_search:keywords query="{segment_3}" format="url"}: jamie%27s+farm

     
    Template debugging:
    (0.129890 / 20.38MB) Low Search: starting search (fallback)
    (0.130077 / 20.38MB) Low Search: Searched but found nothing. Returning no results.

  6. Low 21 Aug 2012 15:18

    Can I take a look myself? You can send superadmin login credentials to hi at gotolow dot com.