Searching through Chinese texts
Hello Low, as previously discussed in the comments of this post:
https://getsatisfaction.com/low/topic...
Here is some more details about the way my EE is structured. Each entry is used to store information about an artist, their real names is broken down into multiple fields:
Family name: 陳
Surname: 月飛
English Family Name: Chen
English Surname: Simon
The Entry Title is automatically generated, it looks like this "陳月飛 Simon Chen" (am using safecracker to create new entries, with jQuery to generate the entry title).
When I search for '陳月飛' LS returns No Results but if I search for '月飛' it will return the correct entry among its search results. Even search for '陳' alone returns multiple entries.
Here is how my input field is coded
{exp:low_search:form collection="artists|bands|groups|locations" search_mode="any" result_page="view_search" loose_ends="both"}{/exp:low_search:form}
My view results page
{exp:low_search:results query="{segment_2}" status="not closed" limit="50" loose_ends="both"}
Replies
Low 4 Sep 2012 09:15
Okay, so first things first.
* Does the collection have weight assigned to the title field?
* Can you look up the entry in the exp_low_search_indexes table (use the SQL manager for that one) and see what the actual index looks like?
* Can you turn on template debugging and the output profiler, then, at the search results page, look up any lines that start with Low Search and look up the query that searches the exp_low_search_indexes table... Can you paste those here?
TheJae 4 Sep 2012 09:24
* Does the collection have weight assigned to the title field?
Title 3
Family name 2
Surname 2
English Family Name 2
English Surname 2
* Can you look up the entry in the exp_low_search_indexes table (use the SQL manager for that one) and see what the actual index looks like?
| 陳月飛 Simon Chen | 陳月飛 Simon Chen | 陳月飛 Simon Chen |
| chen | chen |
| yue fei | yue fei |
| 陳 | 陳 |
| 東飛 | 東飛 |
| simon | simon |
| http www yue fei com |
* Can you turn on template debugging and the output profiler, then, at the search results page, look up any lines that start with Low Search and look up the query that searches the exp_low_search_indexes table... Can you paste those here?
(0.044537 / 1.23MB) Tag: {exp:low_search:results query="YTo1OntzOjg6ImtleXdvcmRzIjtzOjY6IumZs adsSI7czoxMToic2VhcmNoX21vZGUiO3M6MzoiYW55IjtzOjExOiJyZXN1bHRfcGFnZSI7czoxMToidmlld19zZWFyY2giO3M6MTA6ImNvbGxlY3Rpb24iO2E6NDp7aTowO3M6MToiMSI7aToxO3M6MToiMiI7aToyO3M6MToiMyI7aTozO3M6MToiNCI7fXM6MTA6Imxvb3NlX2VuZHMiO3M6NDoiYm90aCI7fQ" status="not closed" limit="50" loose_ends="both"}
(0.059244 / 1.40MB) Low Search: query parameter set but empty or invalid - returning no results
(0.074071 / 1.46MB) Calling Class/Method: Low_search/form
(0.074316 / 1.45MB) -> Class Called: Low_search
(0.075015 / 1.46MB) -> Method Called: form
(0.078502 / 1.48MB) Low Search: form tag - no or invalid query given
There is no exp_low_search_indexes
Low 4 Sep 2012 09:26
Right. Something isn't going right with the encoding/decoding of the query. I'll look into it and report back.
TheJae 4 Sep 2012 09:27
Thank you Low.
Low 5 Sep 2012 08:37
The issue has to do with the serialize() function not playing well with high ascii characters, like Chinese. I do have a solution, but your PHP version must be 5.2+. Is that the case for you?
TheJae 5 Sep 2012 08:39
We have PHP: 5.3.8 here
Low 5 Sep 2012 08:40
Okay. Drop me an email at hi at gotolow dot com, and I'll send you the patched files.
TheJae 5 Sep 2012 08:57
Sent you an e-mail, do you plan to roll these changes into future versions?
Low 5 Sep 2012 08:58
Yes, definitely.
I'm wrapping up the changes now. Will get the files to you today.
TheJae 6 Sep 2012 01:28
Patched applied, jobs done, case closed.
Owe you big time, Low.
Thanks million times!!!!!!!