Channel data may contain ‘smart’ quotes/apostrophes, sometimes encoded. Yet site users naturally search using 'dumb' quotes. Therefore, supersearch may not find entries which ‘match’ the query!
Can anything be done about this?
Well, you are rather lacking any context or examples in your question, however I would recommend stripping characters like this, that could be confused, from the search term completely, go to primitive words. This way even if your results do have 'smart' quotes as you call them in them, the mathcing will be done on a no quotes basis.
as for extra's like 's
and 'll
ect, replace them with nothing "" so a search for rat's
would be a search for rat
, likewise a search for "rat'
(notice the mismatched quotes) would also search for rat
.
In the searched in fields, this will return results for rat
, rat's
, "rat's"
or ratatatata!
.
guardian's allowance
, which may be in the data as guardian's allowance
or guardian’s allowance
or guardian’s allowance
.
sanitize_search_terms
is executed on searching, this strips tags, 'disallowed' characters and cleans nasty stuff. Also /system/expressionengine/modules/search/mod.search.php which does the searching converts things to entities as well. I'd guess SuperSearch does something similar, so check that out. If you want to you could write an extension that overloads the Search helper so you could clean it yourself.
Well, looking plainly for an answer for you, we can do something about it, but it's not an _easy 'turn this on'. there is some common sence cleaning already happening.
What we'll have to do is submit the form to our own php action/code in a template. 'fiddle' with the words a bit, submit them to the relivent library (in this case supersearch). This is a process I've used before:
ee()->input->post()
to get your posted stringYou could of course also do this with Javascript. With jQuery you could hook the click event of the search forms submit, clean your string with JS and return true from the hook function (allowing the submit)...
guardian's
or guardian’s
or guardian’s
in the entries, and a search for guardian
is not the same thing, it's a bit less straightforward than I'd hoped...
I'm assuming "dumb" synonymous to "curly", "fancy", or "typographic" quotes.
Unfortunately there is little that can be done in this case: searches are done based on what is stored and present in the database. If you have data stored with a straight quote '
, that is different, for a computer and MySQL query, to a curly/fancy/typographic/dumb quote ’
. Super Search, and likely other search-based add-ons will see the character difference and not return the result.
Others might suggest modifying core files and code, but that is risky and can lead to even more complications (eg. not distinguishing between '
and ’
is nice until you do want '
to be distinguishable when it's used as something else than an apostrophe). In any case, this non-distinction isn't currently possible with Super Search. Nevertheless, I suggest submitting this as a Feature Request under the specific add-on category. It'll also give other users the option to vote up the feature request, and help us prioritize features to add in upcoming versions of this add-on. :)
http://support.solspace.com/support/discussions
guardian's
to find guardian’s
, too? (As well as guardian
, which ideally we might not want to find, but might be acceptable!)