Search terms with apostrophes
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
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?
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
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
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?
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/" target="_blank">
Jamie's Farm
</a>{exp:low_search:keywords query="{segment_3}" format="url"}:
jamie%27s+farm
Low 21 Aug 2012 15:18
Can I take a look myself? You can send superadmin login credentials to hi at gotolow dot com.