SimpleSearch Issue

I have discovered an issue with simple search. If the search value has a comma in the search term text (“Treaty with the Chickasaw, 1805”) the search returns no results. But a search without the commas (“Treaty with the Chickasaw1805”)I get the correct results .

Is there a list of characters I need to strip from any search strings?


Fixed issue. It was a simple fix as pagetitle, was misspelled in the doc fields.

Developer error not user error!

Still some strangeness with simple search:

One Result with comma: Search - Tribal Treaties Database

Four Results without the comma:

                    &includeTVList=`treaty-locations, treaty-tribes, treaty-tags`

I have not spent much time tweaking SimpleSearch in the past. Our other sites use google search plugins.

This site needs greater control for searches.


As far as I can tell SimpleSearch splits the search string into words (at the positions where there is a space character) and then creates the SQL query with LIKE.

For example a search for “Chickasaw 1805” results in a SQL query like this:

WHERE `modResource`.`pagetitle` LIKE '%Chickasaw%' AND `modResource`.`pagetitle` LIKE '%1805%' ...

But when you search for “Chickasaw, 1805”, then it searches for this comma in your resources and only returns a result if it finds the comma after “Chickasaw”.

WHERE `modResource`.`pagetitle` LIKE '%Chickasaw,%' AND `modResource`.`pagetitle` LIKE '%1805%' ...

I guess I will have to strip non-alpha-numeric characters from the search terms before passing to the page with the SimpleSearch snippet

Thanks for the helpful info,