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?
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.Sign up to join this community
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
'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
In the searched in fields, this will return results for
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 string
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
’ 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. :)