Go Back   Pligg CMS Forum > Pligg Help > General Help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-06-2007, 09:13 AM
Casual Pligger
Pligg Version: 9.7
Pligg Template: yget based
 
Join Date: Aug 2007
Posts: 50
Thanks: 5
Thanked 0 Times in 0 Posts
Case-sensitive (Match Case) Searching

I use Search Method 2. The results are case-sensitive...

How can I find "AAA" by typing "aaa" ?

Thanks.
__________________
Pligg 9.7, PRSE, UM 2, SM 2
XTATIC VIDEO
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 04:02 PM
Casual Pligger
Pligg Version: 9.7
Pligg Template: yget based
 
Join Date: Aug 2007
Posts: 50
Thanks: 5
Thanked 0 Times in 0 Posts
Has somebody solved this problem? Very necessary.
__________________
Pligg 9.7, PRSE, UM 2, SM 2
XTATIC VIDEO
Reply With Quote
  #3 (permalink)  
Old 02-02-2008, 06:13 AM
Casual Pligger
Pligg Version: 9.7
Pligg Template: yget based
 
Join Date: Aug 2007
Posts: 50
Thanks: 5
Thanked 0 Times in 0 Posts
Hello! I found that searching returns results non case-sensitive for tags area. But it still case-sensitive for content area. Help

I would like searching "Word" by typing "word", and "word" by typing "Word".
__________________
Pligg 9.7, PRSE, UM 2, SM 2
XTATIC VIDEO
Reply With Quote
  #4 (permalink)  
Old 08-14-2008, 04:33 PM
Casual Pligger
Pligg Version: 9.7
Pligg Template: yget based
 
Join Date: Aug 2007
Posts: 50
Thanks: 5
Thanked 0 Times in 0 Posts
Any ideas?
__________________
Pligg 9.7, PRSE, UM 2, SM 2
XTATIC VIDEO
Reply With Quote
  #5 (permalink)  
Old 08-15-2008, 07:40 PM
New Pligger
Pligg Version: 9.9.0
Pligg Template: yget
 
Join Date: Apr 2008
Location: Atlanta, GA
Posts: 12
Thanks: 0
Thanked 12 Times in 3 Posts
I just checked my own site, and the search is complete case-insensitive. Maybe that was changed somewhere between 9.7 and 9.9?
Reply With Quote
The Following User Says Thank You to ShanePike For This Useful Post:
  #6 (permalink)  
Old 08-16-2008, 04:06 AM
Casual Pligger
Pligg Version: 9.7
Pligg Template: yget based
 
Join Date: Aug 2007
Posts: 50
Thanks: 5
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by ShanePike View Post
I just checked my own site, and the search is complete case-insensitive. Maybe that was changed somewhere between 9.7 and 9.9?
Thanks! I found that the problem exists only with russian characters. In english everything is ok.

Where should I search the difference, what should I fix?
__________________
Pligg 9.7, PRSE, UM 2, SM 2
XTATIC VIDEO
Reply With Quote
  #7 (permalink)  
Old 08-16-2008, 11:43 AM
New Pligger
Pligg Version: 9.9.0
Pligg Template: yget
 
Join Date: Apr 2008
Location: Atlanta, GA
Posts: 12
Thanks: 0
Thanked 12 Times in 3 Posts
Quote:
Originally Posted by Andreiii View Post
Thanks! I found that the problem exists only with russian characters. In english everything is ok.

Where should I search the difference, what should I fix?
I wonder if this is a function of MySQL and not Pligg. I'm not sure at all, but it feels like it might be.

In libs/search.php, I added this code on line 119:
Code:
echo 'SQL [' . $this->sql . ']';
It may be on a different line in your version of Pligg, but it's right after the if($this->searchTerm == "") block. What it does is output the SQL that's being executed to return the search results. That might give you a clue as to whether it's the way that Pligg is building the query or whether it's the way that MySQL is executing the query.
Reply With Quote
  #8 (permalink)  
Old 08-16-2008, 12:50 PM
Casual Pligger
Pligg Version: 9.7
Pligg Template: yget based
 
Join Date: Aug 2007
Posts: 50
Thanks: 5
Thanked 0 Times in 0 Posts
libs/search.php:
Code:
		if($this->searchTerm == ""){
			// like when on the index or upcoming pages.
			$this->sql = "SELECT link_id $from_where $search_clause $this->orderBy LIMIT $this->offset,$this->pagesize";
		}else{
			$this->sql = "SELECT link_id, link_date, link_published_date $from_where $search_clause ";
		}
		echo 'SQL [' . $this->sql . ']';
		$this->countsql = "SELECT count(*) $from_where $search_clause";

		return;
It showed me the following on the top of site:

SQL [SELECT link_id, link_date, link_published_date FROM pligg_links WHERE link_status!='discard' AND (link_url LIKE '%нарвские%' OR link_url_title LIKE '%нарвские%' OR link_title LIKE '%нарвские%' OR link_content LIKE '%нарвские%' OR link_tags LIKE '%нарвские%' ) ]

by typing нарвские

MySQL or Pligg?
__________________
Pligg 9.7, PRSE, UM 2, SM 2
XTATIC VIDEO
Reply With Quote
  #9 (permalink)  
Old 08-16-2008, 01:13 PM
New Pligger
Pligg Version: 9.9.0
Pligg Template: yget
 
Join Date: Apr 2008
Location: Atlanta, GA
Posts: 12
Thanks: 0
Thanked 12 Times in 3 Posts
Quote:
Originally Posted by Andreiii View Post
It showed me the following on the top of site:

SQL [SELECT link_id, link_date, link_published_date FROM pligg_links WHERE link_status!='discard' AND (link_url LIKE '%нарвские%' OR link_url_title LIKE '%нарвские%' OR link_title LIKE '%нарвские%' OR link_content LIKE '%нарвские%' OR link_tags LIKE '%нарвские%' ) ]

by typing нарвские

MySQL or Pligg?
Because it's just taking what you typed in and passing it along to MySQL, it looks like a function of MySQL. Reading up on Character Sets and Collations in MySQL, it looks like some language collations are case-sensitive -- which I'm assuming is the case here.

I'm not sure at all how you change that (or even if you can change it), but that link should be a good starting point for learning more.
Reply With Quote
The Following User Says Thank You to ShanePike For This Useful Post:
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
[MOD] File Upload Module (v0.1) -- Looking for testers cent Modification Tutorials 54 06-11-2008 10:34 AM
[MOD] File Upload Module for 9.8.2 Is here for download :) Redux Modification Tutorials 7 01-27-2008 08:21 AM
No pagination for stories in profile kbeeveer46 Bug Report 0 08-07-2006 01:22 AM


Search Engine Friendly URLs by vBSEO 3.2.0