Jump to content

i cannot search with chinese character


Recommended Posts

Posted

Hey, I think  i can not search with chinese character, after i input chinese character i can not got search result,there would be empty result

Posted

Hello there! I can't seem to reproduce this -- searching with Chinese characters works just fine for me.

Could you describe in a bit more detail what, where and how you're doing this? Are you talking about search in admin, site (front-end) or..? And just to make sure it's not something that's changed (though I can't think of such a thing right now) could you please provide the version of PW installed.

Posted

I'm talking about site front-end, (I just not have tried admin search)

there  http://tongcheji.com

as i input chinese word i would got none search result, you could reproduce on my website

the latest version of processwire i'm using.

Posted

好孩子

I just searched for: 游览本站 on your site and it returned one result.

Can you post the search term you are testing?

all right...   "好孩子"                   "石家庄市"             etc

Posted

So perhaps you need to look at the code of your search.php template and see if the selector is including the fields where these words occur on your site.

$matches = $pages->find("title|body|sidebar~=$q, limit=50");

The default only searches the title, body and sidebar fields. Add any other relevant fields to that | separated list.

Does that help?

Posted

So perhaps you need to look at the code of your search.php template and see if the selector is including the fields where these words occur on your site.

$matches = $pages->find("title|body|sidebar~=$q, limit=50");

The default only searches the title, body and sidebar fields. Add any other relevant fields to that | separated list.

Does that help?

 And all stuff of a website content is included with 'title body sidebar', how can i miss it? i'm not change the code of search.php

  • Like 1
Posted

Are those search examples you gave complete, distinct "words", or are they part of a longer string of characters?

If the latter, then try changing the selector in the search.php file to:

$matches = $pages->find("title|body|sidebar%=$q, limit=50");

Note that I changed "~=" to "%="

Does that help?

Posted

Are those search examples you gave complete, distinct "words", or are they part of a longer string of characters?

If the latter, then try changing the selector in the search.php file to:

$matches = $pages->find("title|body|sidebar%=$q, limit=50");

Note that I changed "~=" to "%="

Does that help?

it helps.   after i change this it works then.  does that give more Pressure to server?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...