Need more testing... The problem is narrowed to searchs where one word have latin1 characters like "ñ" (it works with other like "áéíóú"). In case of a single word with "ñ" the search result is always 0, and in case of "the thingñ" the mysql thread simply hangs using 100% of cpu.
- The performance problem it's related to a incorrect join planification in mysql under certain circunstances. In ezsearchengine.php, the SELECT JOINs, when we populate the temporary table, are executed in a suboptimal order. To overcome this I have rewrited the SQL sentences using "LEFT JOIN" constructs to force a join order execution. This solved the problem. Now the searches are fast as expected.
- The problem related with the search of words with latin1 characters are due to the mysql treatment of string comparison. This leads to situations where "españa" is equal to "espana" for mysql :-(. This is a problem with words that have different meaning depending on a "ñ" or "n" character... The solution is to declare the phrase and word fields as "BINARY" in mysql creation tables.
I have a patch for both cases. If it can be useful I'll send it to some email address. Regards.
Could you send this patch to Contributions area? I need it for this portal that is coming up... It's Finnish/Spanish/Swedish, so I need the special characters to work in search...
Regards, Jerry
You must be logged in to post messages in this topic!